From a8bc3787776473480ede0960f87c940760b48359 Mon Sep 17 00:00:00 2001 From: Emil Mikulic Date: Fri, 14 Mar 2014 22:45:39 +1100 Subject: [PATCH] Silence warning about unused arg. --- darkhttpd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/darkhttpd.c b/darkhttpd.c index 2c921ef..1d23917 100644 --- a/darkhttpd.c +++ b/darkhttpd.c @@ -91,6 +91,12 @@ static const int debug = 1; # endif #endif +#if defined(__GNUC__) || defined(__INTEL_COMPILER) +# define unused __attribute__((__unused__)) +#else +# define unused +#endif + /* [->] borrowed from FreeBSD's src/sys/sys/systm.h,v 1.276.2.7.4.1 */ #ifndef CTASSERT /* Allow lint to override */ # define CTASSERT(x) _CTASSERT(x, __LINE__) @@ -2462,7 +2468,7 @@ static void pidfile_create(void) { /* [<-] end of pidfile helpers. */ /* Close all sockets and FILEs and exit. */ -static void stop_running(int sig) { +static void stop_running(int sig unused) { running = 0; }