From: Jim Meyering Date: Mon, 10 Aug 2009 10:17:00 +0000 (+0200) Subject: build: daemon/do_debug: parameters aren't always unused X-Git-Tag: 1.0.67~51 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=92ac2400a326256ef819e0195d7ecfa7f03645be build: daemon/do_debug: parameters aren't always unused * daemon/debug.c (MAYBE_UNUSED): Define. (do_debug): Mark parameters as unused only when they really are unused. Spotted by Richard Jones. SCALAR(0xdd8370) prefer sizeof *VAR sizeof TYPE (no semantic change) --- diff --git a/daemon/debug.c b/daemon/debug.c index 5b3b5fa..5083398 100644 --- a/daemon/debug.c +++ b/daemon/debug.c @@ -60,8 +60,14 @@ static struct cmd cmds[] = { }; #endif +#if ! ENABLE_DEBUG_COMMAND +# define MAYBE_UNUSED ATTRIBUTE_UNUSED +#else +# define MAYBE_UNUSED /* empty */ +#endif + char * -do_debug (char *subcmd ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) +do_debug (char *subcmd MAYBE_UNUSED, char **argv MAYBE_UNUSED) { #if ENABLE_DEBUG_COMMAND int argc, i;