From 667bb9191bddaf00cc5c2a86180ee2198c8957f9 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 10 Nov 2013 17:41:07 +0100 Subject: [PATCH] wmaker: Minor improvements to function 'shade_animate' when empty on purpose When animations are disabled, we still create the function but we make it empty to keep the rest of the code simple. This patch does: - mark the function inline, to increase the probability that the compiler will not generate the function at all; - mark arguments as unused to avoid some compilation warnings. Signed-off-by: Christophe CURIS --- src/actions.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/actions.c b/src/actions.c index 2087953c..1087117e 100644 --- a/src/actions.c +++ b/src/actions.c @@ -84,7 +84,14 @@ static int compareTimes(Time t1, Time t2) #ifdef ANIMATIONS static void shade_animate(WWindow *wwin, Bool what); #else -static void shade_animate(WWindow *wwin, Bool what) { } +static inline void shade_animate(WWindow *wwin, Bool what) { + /* + * This function is empty on purpose, so tell the compiler + * to not warn about parameters being not used + */ + (void) wwin; + (void) what; +} #endif /*