public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] gdbserver: fix format string warning in win32-low.cc Date: Thu, 30 Apr 2020 21:49:08 -0400 [thread overview] Message-ID: <e2275c6ee8caa98d6526422743a97d5dd5ac040d@gdb-build> (raw) *** TEST RESULTS FOR COMMIT e2275c6ee8caa98d6526422743a97d5dd5ac040d *** commit e2275c6ee8caa98d6526422743a97d5dd5ac040d Author: Simon Marchi <simon.marchi@polymtl.ca> AuthorDate: Wed Apr 15 21:09:17 2020 -0400 Commit: Simon Marchi <simon.marchi@polymtl.ca> CommitDate: Wed Apr 15 21:09:17 2020 -0400 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. diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index 2b381455ed..2abe0f1268 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2020-04-15 Simon Marchi <simon.marchi@polymtl.ca> + + * win32-low.cc (get_child_debug_event): Fix format string warning. + 2020-04-13 Tom Tromey <tom@tromey.com> * server.h (gdb_fildes_t): Remove typedef. diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc index e1226b4b0d..75305a4cfa 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -1457,7 +1457,7 @@ get_child_debug_event (DWORD *continue_status, /* Pending stop. See the comment by the definition of "pending_stops" for details on why this is needed. */ OUTMSG2 (("get_windows_debug_event - " - "unexpected stop in 0x%x (expecting 0x%x)\n", + "unexpected stop in 0x%lx (expecting 0x%x)\n", ptid.lwp (), desired_stop_thread_id)); maybe_adjust_pc (); pending_stops.push_back ({(DWORD) ptid.lwp (), *ourstatus, current_event});
next reply other threads:[~2020-05-01 1:49 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-01 1:49 gdb-buildbot [this message] 2020-05-01 1:49 ` Failures on Fedora-x86_64-cc-with-index, branch master gdb-buildbot 2020-05-01 2:13 ` Failures on Fedora-x86_64-m32, " gdb-buildbot 2020-05-01 2:19 ` Failures on Fedora-x86_64-m64, " gdb-buildbot 2020-05-01 3:00 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot 2020-05-01 3:01 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot 2020-05-01 13:17 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot 2020-05-02 15:18 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot 2020-05-05 22:55 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, " gdb-buildbot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=e2275c6ee8caa98d6526422743a97d5dd5ac040d@gdb-build \ --to=gdb-buildbot@sergiodj.net \ --cc=gdb-testers@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).