From: Roy Marples Date: Thu, 30 Apr 2015 10:25:16 +0000 (+0000) Subject: Make code cleaner with UNUSED X-Git-Tag: v6.8.2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e5b4d9f11e3628165a0d8a2b8035e3166404590;p=thirdparty%2Fdhcpcd.git Make code cleaner with UNUSED --- diff --git a/script.c b/script.c index ff2c6961..918f700c 100644 --- a/script.c +++ b/script.c @@ -86,14 +86,8 @@ if_printoptions(void) printf(" - %s\n", *p); } -#ifdef USE_SIGNALS -#define U -#else -#define U __unused -#endif static int -exec_script(U const struct dhcpcd_ctx *ctx, char *const *argv, char *const *env) -#undef U +exec_script(const struct dhcpcd_ctx *ctx, char *const *argv, char *const *env) { pid_t pid; posix_spawnattr_t attr; @@ -101,6 +95,8 @@ exec_script(U const struct dhcpcd_ctx *ctx, char *const *argv, char *const *env) #ifdef USE_SIGNALS short flags; sigset_t defsigs; +#else + UNUSED(ctx); #endif /* posix_spawn is a safe way of executing another image