sim: testsuite: Fix build with host GCC15

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>
This commit is contained in:
Dimitar Dimitrov
2025-05-03 23:36:30 +03:00
parent a20c995577
commit c67b2ee18a

View 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;