From: Tom de Vries Date: Sat, 7 Jun 2025 21:28:53 +0000 (+0200) Subject: [gdb/build] Fix buildbreaker in hardwire_setbaudrate X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea4a83d36f1c558a185b8588cbeaec019c8fa6b0;p=thirdparty%2Fbinutils-gdb.git [gdb/build] Fix buildbreaker in hardwire_setbaudrate When building on x86_64-cygwin, I run into: ... In file included from gdbsupport/common-defs.h:203, from gdb/defs.h:26, from : gdb/ser-unix.c: In function ‘void hardwire_setbaudrate(serial*, int)’: gdbsupport/gdb_locale.h:28:20: error: expected ‘)’ before ‘gettext’ 28 | # define _(String) gettext (String) | ^~~~~~~ gdbsupport/gdb_assert.h:43:43: note: in expansion of macro ‘_’ 43 | internal_error_loc (__FILE__, __LINE__, _("%s: " message), __func__, \ | ^ gdb/ser-unix.c:590:7: note: in expansion of macro ‘gdb_assert_not_reached’ 590 | gdb_assert_not_reached (_("Serial baud rate was not found in B_codes")); | ^~~~~~~~~~~~~~~~~~~~~~ gdb/ser-unix.c:590:31: note: in expansion of macro ‘_’ 590 | gdb_assert_not_reached (_("Serial baud rate was not found in B_codes")); | ^ gdbsupport/gdb_locale.h:28:28: note: to match this ‘(’ 28 | # define _(String) gettext (String) | ^ gdbsupport/gdb_assert.h:43:43: note: in expansion of macro ‘_’ 43 | internal_error_loc (__FILE__, __LINE__, _("%s: " message), __func__, \ | ^ gdb/ser-unix.c:590:7: note: in expansion of macro ‘gdb_assert_not_reached’ 590 | gdb_assert_not_reached (_("Serial baud rate was not found in B_codes")); | ^~~~~~~~~~~~~~~~~~~~~~ ... Fix this by dropping the unneeded _() on the gdb_assert_not_reached argument. PR build/33064 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33064 --- diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c index cc81e3bb826..64db84bc43f 100644 --- a/gdb/ser-unix.c +++ b/gdb/ser-unix.c @@ -587,7 +587,7 @@ hardwire_setbaudrate (struct serial *scb, int rate) #else /* An error should already have been thrown by rate_to_code(). Add an additional error in case execution somehow reaches this line. */ - gdb_assert_not_reached (_("Serial baud rate was not found in B_codes")); + gdb_assert_not_reached ("Serial baud rate was not found in B_codes"); #endif } else