From: Andrew Cagney <ac131313@cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: [patch/ob]
Date: Tue, 11 Dec 2001 10:18:00 -0000 [thread overview]
Message-ID: <3C164DDD.5020904@cygnus.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 104 bytes --]
Just FYI,
I've checked the attached in as, er, obvious. It fixes a
-Wuninitialized warning.
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1326 bytes --]
2001-12-11 Andrew Cagney <ac131313@redhat.com>
* values.c: Include "gdb_assert.h".
(value_fn_field): Rearange to avoid -Wuninitialized warning.
Index: values.c
===================================================================
RCS file: /cvs/src/src/gdb/values.c,v
retrieving revision 1.30
diff -p -r1.30 values.c
*** values.c 2001/12/10 23:05:00 1.30
--- values.c 2001/12/11 18:05:09
***************
*** 33,38 ****
--- 33,39 ----
#include "scm-lang.h"
#include "demangle.h"
#include "doublest.h"
+ #include "gdb_assert.h"
/* Prototypes for exported functions. */
*************** value_fn_field (value_ptr *arg1p, struct
*** 971,983 ****
struct minimal_symbol *msym;
sym = lookup_symbol (physname, 0, VAR_NAMESPACE, 0, NULL);
! if (!sym)
{
msym = lookup_minimal_symbol (physname, NULL, NULL);
}
-
- if (!sym && !msym)
- return NULL;
v = allocate_value (ftype);
if (sym)
--- 972,988 ----
struct minimal_symbol *msym;
sym = lookup_symbol (physname, 0, VAR_NAMESPACE, 0, NULL);
! if (sym != NULL)
{
+ msym = NULL;
+ }
+ else
+ {
+ gdb_assert (sym == NULL);
msym = lookup_minimal_symbol (physname, NULL, NULL);
+ if (msym == NULL)
+ return NULL;
}
v = allocate_value (ftype);
if (sym)
next reply other threads:[~2001-12-11 18:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-11 10:18 Andrew Cagney [this message]
2001-12-11 11:43 ` [patch/ob] Daniel Jacobowitz
2001-12-11 18:40 ` [patch/ob] Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C164DDD.5020904@cygnus.com \
--to=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox