[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5hbpy2rqmm.wl%tiwai@suse.de>
Date: Fri, 03 Oct 2008 11:10:09 +0200
From: Takashi Iwai <tiwai@...e.de>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Jaroslav Kysela <perex@...ex.cz>,
Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 4/5] sound: update snd_assert macro
At Thu, 02 Oct 2008 11:05:33 -0400,
Steven Rostedt wrote:
>
> One user of the snd_assert macro calls a goto and the compiler
> complains that the label is not used when the snd_assert is
> not set.
>
> This patch makes snd_assert more robust when not defined to
> let the compiler know about arguments when not in use.
This issue was already fixed differently in the recent ALSA tree
(thus in linux-next tree as well).
thanks,
Takashi
>
> CC: Jaroslav Kysela <perex@...ex.cz>
> Signed-off-by: Steven Rostedt <srostedt@...hat.com>
> ---
> include/sound/core.h | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> Index: linux-compile.git/include/sound/core.h
> ===================================================================
> --- linux-compile.git.orig/include/sound/core.h 2008-07-27 09:26:33.000000000 -0400
> +++ linux-compile.git/include/sound/core.h 2008-10-02 10:00:57.000000000 -0400
> @@ -407,7 +407,13 @@ void snd_verbose_printd(const char *file
> #else /* !CONFIG_SND_DEBUG */
>
> #define snd_printd(fmt, args...) /* nothing */
> -#define snd_assert(expr, args...) (void)(expr)
> +/* Keep the compiler happy by showing the expr and args */
> +#define snd_assert(expr, args...) do { \
> + if (0) { \
> + (void)(expr); \
> + args; \
> + } \
> +} while(0)
> #define snd_BUG() /* nothing */
>
> #endif /* CONFIG_SND_DEBUG */
>
> --
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists