This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC][PATCH v3] Consolidate gdbserver global variables
On 05/29/2018 08:52 PM, Stan Cox wrote:
>
>
> On 05/25/2018 10:31 AM, Pedro Alves wrote:
>
>> You mean, without the change, we trigger a warning? What
>> does it look like? If we do, then we'll need to address it
>> somehow, of course, given -Werror.
>
> This is vanilla upstream gdb, no patches,
Ah, alright, since this happens on pristine master, it's unrelated
to your patch. Please leave it out. And ...
> with gcc 7.3.1 on F27
>
> ../../../src/gdb/gdbserver/server.c: In function ‘int handle_qxfer_btrace_conf(const char*, gdb_byte*, const gdb_byte*, ULONGEST, LONGEST)’:
> ../../../src/gdb/gdbserver/server.c:1966:7: warning: ‘result’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> if (result != 0)
> ^~
> ../../../src/gdb/gdbserver/server.c: In function ‘int handle_qxfer_btrace(const char*, gdb_byte*, const gdb_byte*, ULONGEST, LONGEST)’:
> ../../../src/gdb/gdbserver/server.c:1895:7: warning: ‘result’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> if (result != 0)
> ^~
I've looked into this and pushed a fix, here:
https://sourceware.org/ml/gdb-patches/2018-05/msg00783.html
Thanks,
Pedro Alves