From 7c02d5f1c5e4edcc22869d68930f174368d661bb Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 13 Oct 2013 22:44:13 +0200 Subject: [PATCH] wmaker: Marked args as unused for compiler in process death handlers When a sub-process terminate, the function to process that event is defined using a callback mechanism, which means having a fixed argument list for that application function. It is then 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 --- src/defaults.c | 4 ++++ src/main.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/defaults.c b/src/defaults.c index 9b490ecb..37354488 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -2903,6 +2903,10 @@ static void trackDeadProcess(pid_t pid, unsigned int status, void *client_data) { WScreen *scr = (WScreen *) client_data; + /* Parameter not used, but tell the compiler that it is ok */ + (void) pid; + (void) status; + close(scr->helper_fd); scr->helper_fd = 0; scr->helper_pid = 0; diff --git a/src/main.c b/src/main.c index ae89eff4..59a21f7a 100644 --- a/src/main.c +++ b/src/main.c @@ -265,6 +265,9 @@ static void shellCommandHandler(pid_t pid, unsigned int status, void *client_dat { _tuple *data = (_tuple *) client_data; + /* Parameter not used, but tell the compiler that it is ok */ + (void) pid; + if (status == 127) { char *buffer;