diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-12-11 18:35:38 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-12-11 18:35:38 +0000 |
commit | 5ae326fa7049c90412645417e00dfed7325dc279 (patch) | |
tree | 6de14f81cb0286ef6d4e8a480c4967bfa7938cb4 /gdb/values.c | |
parent | 583f192640de9cb90cf171ea6112d3d05855fef4 (diff) | |
download | fsf-binutils-gdb-5ae326fa7049c90412645417e00dfed7325dc279.zip fsf-binutils-gdb-5ae326fa7049c90412645417e00dfed7325dc279.tar.gz fsf-binutils-gdb-5ae326fa7049c90412645417e00dfed7325dc279.tar.bz2 |
Rearange code to supress -Wuninitialized error.
Diffstat (limited to 'gdb/values.c')
-rw-r--r-- | gdb/values.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/values.c b/gdb/values.c index b8407e1..cc90caa 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -33,6 +33,7 @@ #include "scm-lang.h" #include "demangle.h" #include "doublest.h" +#include "gdb_assert.h" /* Prototypes for exported functions. */ @@ -971,14 +972,18 @@ value_fn_field (value_ptr *arg1p, struct fn_field *f, int j, struct type *type, struct minimal_symbol *msym; sym = lookup_symbol (physname, 0, VAR_NAMESPACE, 0, NULL); - if (!sym) + if (sym != NULL) { + msym = NULL; + } + else + { + gdb_assert (sym == NULL); msym = lookup_minimal_symbol (physname, NULL, NULL); + if (msym == NULL) + return NULL; } - if (!sym && !msym) - return NULL; - v = allocate_value (ftype); if (sym) { |