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: Initialize status in gdbserver/linux-low.c


On 07/16/2012 04:54 PM, Sterling Augustine wrote:
> Hi,
> 
> As the code for handle_extended_wait exists today, status can be used
> uninitialized on line 486 if pull_pid_from_list on line 451 returns
> true.

If pull_pid_from_list returns true, then it has written to status.
Sounds like you're getting a false positive warning?

> 
> This near-trivial patch initializes it to zero at the declaration.
> 
> OK for mainline?

If this is indeed a false warning, then this is okay with
a "Avoid GCC false warning" comment or some such.

-- 
Pedro Alves


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