gdbserver: fix format string warning in win32-low.cc
When compiling on Cygwin, we get:
CXX win32-low.o
/home/smarchi/src/binutils-gdb/gdbserver/win32-low.cc: In function ‘int get_child_debug_event(DWORD*, target_waitstatus*)’:
/home/smarchi/src/binutils-gdb/gdbserver/win32-low.cc:1459:17: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Werror=format=]
1459 | OUTMSG2 (("get_windows_debug_event - "
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1460 | "unexpected stop in 0x%x (expecting 0x%x)\n",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1461 | ptid.lwp (), desired_stop_thread_id));
| ~~~~~~~~~~~
| |
| long int
/home/smarchi/src/binutils-gdb/gdbserver/win32-low.cc:52:11: note: in definition of macro ‘OUTMSG2’
52 | printf X; \
| ^
/home/smarchi/src/binutils-gdb/gdbserver/win32-low.cc:1460:26: note: format string is defined here
1460 | "unexpected stop in 0x%x (expecting 0x%x)\n",
| ~^
| |
| unsigned int
| %lx
`ptid.lwp ()` is a `long` value, so it indeed needs the `l` size modifier.
gdbserver/ChangeLog:
* win32-low.cc (get_child_debug_event): Fix format string warning.