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


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