This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/8] Simple -Wshadow=local fixes
- From: Tom Tromey <tom at tromey dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: Simon Marchi <simon dot marchi at ericsson dot com>, Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Thu, 04 Oct 2018 06:42:53 -0600
- Subject: Re: [PATCH 1/8] Simple -Wshadow=local fixes
- References: <20180923040814.27941-1-tom@tromey.com> <20180923040814.27941-2-tom@tromey.com> <3ce6c920-3474-d5a3-db27-4fffc1d2d5b3@ericsson.com> <1bd3f5fc355ca6ef125b1e51a4371861@polymtl.ca>
>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
>> CXX mdebugread.o
>> /home/emaisin/src/binutils-gdb/gdb/mdebugread.c: In function ‘void
>> parse_partial_symbols(minimal_symbol_reader&, objfile*)’:
>> /home/emaisin/src/binutils-gdb/gdb/mdebugread.c:3573:42: warning:
>> ‘name’ may be used uninitialized in this function
>> [-Wmaybe-uninitialized]
>> add_psymbol_to_list (name, strlen (name), 1,
>> ^
>>
>> Simon
Simon> I don't get the warning with a recent-ish gcc build from source:
Simon> gcc (GCC) 9.0.0 20180906 (experimental)
Simon> so it might very well be a false positive. That function is so big I
Simon> can't really tell...
No, it's really a bug in my patch. I'm not sure if it was always a bug
or if it was introduced by some rebase, but given the rate of change of
mdebugread I would guess the former.
I have a fix, but now I plan to go re-read the patches again to try to
make sure I didn't introduce any more bugs.
Tom