<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From a6e56a35d0964ad7ab09b6cf6b7c4c353db6adf3 Mon Sep 17 00:00:00 2001
From: Adam Sampson &lt;ats@offog.org&gt;
Date: Thu, 15 May 2025 12:16:30 +0100
Subject: [PATCH 1/1] Correct prototypes for C23 compatibility

In older versions of C, "void foo()" declares a function that can take
any set of arguments. In C23, "()" means the same as "(void)": the
function takes no arguments.

elk.h declares many functions with "()", so function arguments weren't
being checked. Compiling with GCC 15, which uses C23 by default,
revealed some cases where functions were being prototyped or called with
incorrect arguments.
---
 src/elk.h       |  2 +-
 src/linux-gui.c | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/elk.h b/src/elk.h
index 06c6498..b7ec8bb 100644
--- a/src/elk.h
+++ b/src/elk.h
@@ -223,7 +223,7 @@ extern int motorspin;
 
 extern char exedir[MAX_PATH_FILENAME_BUFFER_SIZE];
 
-void initelk();
+void initelk(int argc, char *argv[]);
 void closeelk();
 void cleardrawit();
 void runelk();
diff --git a/src/linux-gui.c b/src/linux-gui.c
index 03fcfc1..72e53f8 100644
--- a/src/linux-gui.c
+++ b/src/linux-gui.c
@@ -105,7 +105,7 @@ int gui_loads()
         if (ret)
         {
                 memcpy(ssname,tempname,260);
-                loadstate(ssname);
+                loadstate();
         }
         return D_O_K;
 }
@@ -119,7 +119,7 @@ int gui_saves()
         if (ret)
         {
                 memcpy(ssname,tempname,260);
-                savestate(ssname);
+                savestate();
         }
         return D_O_K;
 }
@@ -618,7 +618,7 @@ int gui_scrshot()
         if (ret)
         {
                 memcpy(scrshotname,tempname,260);
-                savescrshot(scrshotname);
+                savescrshot();
         }
         return D_O_K;
 }
@@ -633,14 +633,14 @@ int gui_startmovie()
         if (ret)
         {
                 memcpy(moviename,tempname,260);
-                startmovie(moviename);
+                startmovie();
         }
         return D_O_K;
 }
 
 int gui_stopmovie()
 {
-    stopmovie(moviename);
+    stopmovie();
     return D_O_K;
 }
 
-- 
2.49.0

</pre></body></html>