From: Christophe CURIS <[email protected]> As this code may be used as an example, we'd better do things clear
Signed-off-by: Christophe CURIS <[email protected]> --- test/wtest.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/test/wtest.c b/test/wtest.c index c886c5b..37f285d 100644 --- a/test/wtest.c +++ b/test/wtest.c @@ -31,13 +31,16 @@ WMAppContext *app; static void callback(int item) { - (void) item; - printf("pushed item %i\n", item); } static void quit(int item) { + /* + * This parameter is not used, but because we're a call-back we have a fixed + * prototype, so we tell the compiler it is ok to avoid a spurious unused + * variable warning + */ (void) item; exit(0); @@ -45,6 +48,11 @@ static void quit(int item) static void hide(int item) { + /* + * This parameter is not used, but because we're a call-back we have a fixed + * prototype, so we tell the compiler it is ok to avoid a spurious unused + * variable warning + */ (void) item; WMHideApplication(app); @@ -63,6 +71,12 @@ static void newwin(int item) Window win; XClassHint classhint; char title[100]; + + /* + * This parameter is not used, but because we're a call-back we have a fixed + * prototype, so we tell the compiler it is ok to avoid a spurious unused + * variable warning + */ (void) item; wincount++; -- 1.8.5.3 -- To unsubscribe, send mail to [email protected].
