1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
Author: Jeremy Sowden <jeremy@azazel.net>
Last-Update: 2025-02-27
Bug-Debian: https://bugs.debian.org/1098103
Forwarded: yes
Applied-Upstream: commit:8459109bb39885bb9c3a0e2b0692e70aa7b82c1a
Description: update pre-ANSI function definitions
Pre-ANSI function declarators which do not declare their parameters have been
removed in C23 and the syntax reused for declaring functions with no parameters
(like C++). GCC 15 defaults to C23, so these declarators will cause an FTBFS.
.
Use consistent, up-to-date function prototypes in wmget's option-parsing code.
--- a/configure.c
+++ b/configure.c
@@ -76,13 +76,13 @@
}
-static void set_silent ()
+static void set_silent (Request *r, ServerConfig *c, const char *v)
{
set_output_level (OL_SILENT);
}
-static void set_verbose ()
+static void set_verbose (Request *r, ServerConfig *c, const char *v)
{
set_output_level (OL_DEBUG);
}
@@ -137,14 +137,14 @@
}
-static void set_overwrite (Request *r, ServerConfig *c)
+static void set_overwrite (Request *r, ServerConfig *c, const char *v)
{
if (r) r->overwrite = 1;
if (c) c->job_defaults.overwrite = 1;
}
-static void set_continue (Request *r, ServerConfig *c)
+static void set_continue (Request *r, ServerConfig *c, const char *v)
{
if (r) r->continue_from = 1;
if (c) c->job_defaults.continue_from = 1;
@@ -172,7 +172,7 @@
}
-static void set_ascii (Request *r, ServerConfig *c)
+static void set_ascii (Request *r, ServerConfig *c, const char *v)
{
if (r) r->use_ascii = 1;
if (c) c->job_defaults.use_ascii = 1;
@@ -186,7 +186,7 @@
}
-static void set_headers (Request *r, ServerConfig *c)
+static void set_headers (Request *r, ServerConfig *c, const char *v)
{
if (r) r->include = 1;
if (c) c->job_defaults.include = 1;
@@ -249,11 +249,11 @@
default:
return 1;
-#define yes , optarg
-#define no
+#define yes optarg
+#define no NULL
#define O(s,l,a,t) \
case optchar_##l: \
- set_##l (req, cfg a); \
+ set_##l (req, cfg, a); \
break;
#include "config.def"
#undef O
@@ -338,7 +338,7 @@
"extra argument: '%s'", value); \
} else { \
debug ("set " #NAM " <no value>"); \
- set_##NAM (0, cfg); \
+ set_##NAM (0, cfg, NULL); \
}
# define O(s,l,a,t) \
|