]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: testsuite: Fix build with host GCC15
authorDimitar Dimitrov <dimitar@dinux.eu>
Sat, 3 May 2025 20:36:30 +0000 (23:36 +0300)
committerDimitar Dimitrov <dimitar@dinux.eu>
Mon, 19 May 2025 18:12:51 +0000 (21:12 +0300)
Simulator testsuite build started failing with host GCC-15:

  bits-tst.c:323:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes]
  bits-tst.c: In function ‘main’:
  bits-tst.c:323:1: error: old-style function definition [-Werror=old-style-definition]

Fix by including string.h to get the required prototypes, and changing
main's declaration to modern C.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
Approved-By: Tom Tromey <tom@tromey.com>
sim/testsuite/common/bits-tst.c

index a30753e4b16ab47a7ba20137dc9bf28891b6fbb3..95ca4501bbb11f42e40a70338c981b149bc6c36f 100644 (file)
@@ -1,4 +1,5 @@
 # 2 "bits-tst.c"
+#include <string.h>
 
 /* Drive the bit test routines */
 
@@ -320,9 +321,7 @@ check_bits (int call,
 
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int errors = 0;