From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12882 invoked by alias); 11 Dec 2001 18:18:14 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12774 invoked from network); 11 Dec 2001 18:18:08 -0000 Received: from unknown (HELO localhost.cygnus.com) (205.180.231.71) by sources.redhat.com with SMTP; 11 Dec 2001 18:18:08 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id 2AF053D60 for ; Tue, 11 Dec 2001 10:18:05 -0800 (PST) Message-ID: <3C164DDD.5020904@cygnus.com> Date: Tue, 11 Dec 2001 10:18:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.6) Gecko/20011207 X-Accept-Language: en-us MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [patch/ob] Content-Type: multipart/mixed; boundary="------------010805040102010203000500" X-SW-Source: 2001-12/txt/msg00303.txt.bz2 This is a multi-part message in MIME format. --------------010805040102010203000500 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 104 Just FYI, I've checked the attached in as, er, obvious. It fixes a -Wuninitialized warning. Andrew --------------010805040102010203000500 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 1326 2001-12-11 Andrew Cagney * 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) --------------010805040102010203000500--