From 6dba612d58b2f48959a3a87528a3192e7f94f26c Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sat, 19 Oct 2013 22:17:48 +0200 Subject: [PATCH] WUtil: Marked args as unused for compiler in a callback functions As callback have a fixed prototype, it can be correct to not use all the arguments, so this patch adds the appropriate stuff to avoid a false report from compiler. Signed-off-by: Christophe CURIS --- WINGs/menuparser_macros.c | 3 +++ WINGs/proplist.c | 4 ++++ WINGs/userdefaults.c | 3 +++ 3 files changed, 10 insertions(+) diff --git a/WINGs/menuparser_macros.c b/WINGs/menuparser_macros.c index 511334fc..2b093db8 100644 --- a/WINGs/menuparser_macros.c +++ b/WINGs/menuparser_macros.c @@ -679,6 +679,9 @@ static void mpm_get_user_name(WParserMacro *this, WMenuParser parser) /* Number id of the user under which we are running */ static void mpm_get_user_id(WParserMacro *this, WMenuParser parser) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) parser; + if (this->value[0] != '\0') return; // Already evaluated, re-use previous snprintf((char *) this->value, sizeof(this->value), "%d", getuid() ); } diff --git a/WINGs/proplist.c b/WINGs/proplist.c index 49cc53f3..beb209d6 100644 --- a/WINGs/proplist.c +++ b/WINGs/proplist.c @@ -1766,6 +1766,10 @@ int wmkdirhier(const char *path) static int wrmdirhier_fn(const char *path, const struct stat *st, int type, struct FTW *ftw) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) st; + (void) ftw; + switch(type) { case FTW_D: break; diff --git a/WINGs/userdefaults.c b/WINGs/userdefaults.c index 29473313..160a08b6 100644 --- a/WINGs/userdefaults.c +++ b/WINGs/userdefaults.c @@ -136,6 +136,9 @@ static void synchronizeUserDefaults(void *foo) { UserDefaults *database = sharedUserDefaults; + /* Parameter not used, but tell the compiler that it is ok */ + (void) foo; + while (database) { if (!database->dontSync) WMSynchronizeUserDefaults(database);