On 1/25/25 02:55, Torbjörn SVENSSON wrote:
Signed-off-by: Torbjörn SVENSSON <torbjorn.svens...@foss.st.com>
---
ChangeLog | 5 +++++
testglue.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c6804f0..23bca8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-01-25 Torbjörn Svensson <torbjorn.svens...@foss.st.com>
+
+ * testglue.c: Add missing argument to function prototype for
+ REAL_EXIT and REAL__EXIT.
+
2024-10-20 Jacob Bachmeyer <j...@gnu.org>
PR73907
diff --git a/testglue.c b/testglue.c
index 06f4a90..348479a 100644
--- a/testglue.c
+++ b/testglue.c
@@ -48,12 +48,12 @@ extern void exit (int);
#endif
#ifdef REAL_MAIN
-extern void REAL_EXIT ();
+extern void REAL_EXIT (int);
extern void REAL_ABORT ();
extern int REAL_MAIN (int argc, char **argv, char **envp);
#endif
#ifdef REAL__EXIT
-extern void REAL__EXIT ();
+extern void REAL__EXIT (int);
#endif
static int done_exit_message = 0;
As I understand, this is a shift in C dialect over the years if it is a
real issue. Originally, an empty argument list did not mean "no
arguments" but "unspecified arguments". To declare "no arguments" you
must explicitly write "func(void)" in C.
While I seem to recall that the C standard has always specified exit(3)
to take an "int" argument, it was also implicitly intended for programs
hosted on Unix and a freestanding board might not use an exit code and
simply halt or shut down when "exit()" is called.
This also looks like you might actually know what testglue.c actually
does and how it is used. Could you enlighten me on that or at least
point me to an example of something that uses it? I am currently
reluctant to touch it because I do not know what changing it might break.
-- Jacob