1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

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 <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2013-11-10 17:41:07 +01:00
committed by Carlos R. Mafra
parent 62565b42f6
commit 667bb9191b

View File

@@ -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
/*