ALSA compiler warnings fixes
PATCH 1/1 ALSA compiler warnings fixes
Linus,
Attached patch fixes numerous warnings in ALSA core of the type "unused variable foo" due to defined-away functions.
Usual solution applied.
Patch is against current BK, please apply.
Robert Love
Fix numerous ALSA core compiler warnings of the type "unused variable foo"
include/sound/core.h | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
include/sound/core.h +5 -5
@@ -177,11 +177,11 @@ wake_up(&card->power_sleep); }#else -#define snd_power_lock (card) do { ; } while (0) -#define snd_power_unlock (card) do { ; } while (0) -#define snd_power_wait (card) do { ; } while (0) -#define snd_power_get_state (card) SNDRV_CTL_POWER_D0 -#define snd_power_change_state (card, state) do { ; } while (0) +#define snd_power_lock (card) do { (void)(card); } while (0) +#define snd_power_unlock (card) do { (void)(card); } while (0) +#define snd_power_wait (card) do { (void)(card); } while (0) +#define snd_power_get_state (card) SNDRV_CTL_POWER_D0 +#define snd_power_change_state (card, state) do { (void)(card); } while (0)#endif /* device.c */
Quoted 4 lines · Robert Love
Linus,
Attached patch fixes numerous warnings in ALSA core of the type "unused variable foo" due to defined-away functions.
ALSA has an active maintainer, you should at least CC them on patches to their subsystem...
Quoted 2 lines · Jeff Garzik
ALSA has an active maintainer, you should at least CC them on
patches to their subsystem...
It is hard to tell, they are off on their own list with their own CVS...
Here it is again. Is this OK with you guys? It fixes a bunch of warnings in my compile.
Robert Love
Fix numerous ALSA core compiler warnings of the type "unused variable foo"
include/sound/core.h | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
include/sound/core.h +5 -5
@@ -177,11 +177,11 @@ wake_up(&card->power_sleep); }#else -#define snd_power_lock (card) do { ; } while (0) -#define snd_power_unlock (card) do { ; } while (0) -#define snd_power_wait (card) do { ; } while (0) -#define snd_power_get_state (card) SNDRV_CTL_POWER_D0 -#define snd_power_change_state (card, state) do { ; } while (0) +#define snd_power_lock (card) do { (void)(card); } while (0) +#define snd_power_unlock (card) do { (void)(card); } while (0) +#define snd_power_wait (card) do { (void)(card); } while (0) +#define snd_power_get_state (card) SNDRV_CTL_POWER_D0 +#define snd_power_change_state (card, state) do { (void)(card); } while (0)#endif /* device.c */