+2001-12-11 Andrew Cagney <ac131313@redhat.com>
+
+ * values.c: Include "gdb_assert.h".
+ (value_fn_field): Rearange to avoid -Wuninitialized warning.
+
2001-12-10 Fred Fish <fnf@redhat.com>
* values.c (value_fn_field): Add physname variable. Use a minimal
#include "scm-lang.h"
#include "demangle.h"
#include "doublest.h"
+#include "gdb_assert.h"
/* Prototypes for exported functions. */
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)
{