Initialize status in gdbserver/linux-low.c

Sterling Augustine saugustine@google.com
Mon Jul 16 17:09:00 GMT 2012


On Mon, Jul 16, 2012 at 9:06 AM, Pedro Alves <palves@redhat.com> wrote:
> 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.

My mistake. I was compiling an older version of gdb where
pull_pid_from_list didn't include the third parameter. Then forward
ported the fix.

Sterling



More information about the Gdb-patches mailing list