This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/8] Simple -Wshadow=local fixes


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]