From: Christophe CURIS <[email protected]>

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 <[email protected]>
---
 src/actions.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/actions.c b/src/actions.c
index 2087953..1087117 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
 
 /*
-- 
1.8.4.rc3


-- 
To unsubscribe, send mail to [email protected].

Reply via email to