From c67b2ee18a9e064243902c265cb9b24aa736bdab Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Sat, 3 May 2025 23:36:30 +0300 Subject: [PATCH] sim: testsuite: Fix build with host GCC15 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Approved-By: Tom Tromey --- sim/testsuite/common/bits-tst.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sim/testsuite/common/bits-tst.c b/sim/testsuite/common/bits-tst.c index a30753e4b16..95ca4501bbb 100644 --- a/sim/testsuite/common/bits-tst.c +++ b/sim/testsuite/common/bits-tst.c @@ -1,4 +1,5 @@ # 2 "bits-tst.c" +#include /* 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; -- 2.39.5