[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 <command-line>:
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
This commit is contained in:
Tom de Vries
2025-06-07 23:28:53 +02:00
parent bd52f6f48c
commit ea4a83d36f

View File

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