mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
(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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user