Skip to content

Commit

Permalink
alsa: fix snd_BUG_on() and friends
Browse files Browse the repository at this point in the history
sound/pci/pcxhr/pcxhr_core.c: In function 'pcxhr_set_pipe_cmd_params':
sound/pci/pcxhr/pcxhr_core.c:700: warning: statement with no effect
sound/pci/pcxhr/pcxhr_core.c:706: warning: statement with no effect
sound/pci/pcxhr/pcxhr_core.c:710: warning: statement with no effect

Due to

try to fix this, and be more conventional about the empty stubs.

Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
akpm00 authored and tiwai committed Nov 7, 2008
1 parent 55e03a6 commit fcef783
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions include/sound/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,13 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)

#else /* !CONFIG_SND_DEBUG */

#define snd_printd(fmt, args...) /* nothing */
#define snd_BUG() /* nothing */
#define snd_BUG_ON(cond) ({/*(void)(cond);*/ 0;}) /* always false */
#define snd_printd(fmt, args...) do { } while (0)
#define snd_BUG() do { } while (0)
static inline int __snd_bug_on(void)
{
return 0;
}
#define snd_BUG_ON(cond) __snd_bug_on() /* always false */

#endif /* CONFIG_SND_DEBUG */

Expand Down

0 comments on commit fcef783

Please sign in to comment.