From a1f42e84b8ba21b9cbdc58b9a3a5427137881af3 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 27 Feb 2007 22:00:39 +0000 Subject: [PATCH] (varobj_update): Remove unused local. Use gdb_assert to check changelist is non-NULL. Call error if the frontend tries to update a non-root variable. --- gdb/varobj.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gdb/varobj.c b/gdb/varobj.c index a2fd1c8bbd3..f86082eca5e 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1037,7 +1037,6 @@ int varobj_update (struct varobj **varp, struct varobj ***changelist) { int changed = 0; - int error = 0; int type_changed; int i; int vleft; @@ -1051,13 +1050,10 @@ varobj_update (struct varobj **varp, struct varobj ***changelist) struct frame_info *fi; /* sanity check: have we been passed a pointer? */ - if (changelist == NULL) - return WRONG_PARAM; + gdb_assert (changelist); - /* Only root variables can be updated... */ if (!is_root_p (*varp)) - /* Not a root var. */ - return WRONG_PARAM; + error (_("Only root variables can be updated")); if (!(*varp)->root->is_valid) return INVALID; -- 2.30.2