]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/build] Fix buildbreaker in hardwire_setbaudrate
authorTom de Vries <tdevries@suse.de>
Sat, 7 Jun 2025 21:28:53 +0000 (23:28 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 7 Jun 2025 21:28:53 +0000 (23:28 +0200)
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

gdb/ser-unix.c

index cc81e3bb8265d24dc58ef2564906ce19ff4cef5c..64db84bc43f8f522855ddb8ba8facdeaafd9cf46 100644 (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