From: Takashi Iwai Subject: Re: [PATCH] ALSA: have snd_BUG_ON() always refer to arguments Date: Fri, 07 Nov 2008 07:22:02 +0100 Message-ID: References: <1226023521-10037-1-git-send-email-vapier@gentoo.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 4FDE110387E for ; Fri, 7 Nov 2008 07:22:03 +0100 (CET) In-Reply-To: <1226023521-10037-1-git-send-email-vapier@gentoo.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Mike Frysinger Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org At Thu, 6 Nov 2008 21:05:21 -0500, Mike Frysinger wrote: > > The snd_BUG_ON() macro should always expand its argument even if we're > forcing it to false. This kills off unused warnings that did not exist > before the snd_assert() -> snd_BUG_ON() conversion. > > Signed-off-by: Mike Frysinger Andrew already change this differently. Check with the latest version. And which warning did you get actually? thanks, Takashi > --- > include/sound/core.h | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/include/sound/core.h b/include/sound/core.h > index 35424a9..87de9fc 100644 > --- a/include/sound/core.h > +++ b/include/sound/core.h > @@ -387,7 +387,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) > > #define snd_printd(fmt, args...) /* nothing */ > #define snd_BUG() /* nothing */ > -#define snd_BUG_ON(cond) ({/*(void)(cond);*/ 0;}) /* always false */ > +#define snd_BUG_ON(cond) ((cond) && 0) /* always false */ > > #endif /* CONFIG_SND_DEBUG */ > > -- > 1.6.0.3 >