Re: [patch] ALSA compiler warnings fixes

Giacomo Catenazzi (cate@debian.org)
Tue, 19 Nov 2002 12:30:21 +0100


> +#define snd_power_unlock(card) do { (void)(card); } while (0)

Why do we use in kernel:
do { (void)(foobar); } while (0)
instead of the simpler and normally used in std files (e.g. assert.h):
((void)(foobar),0)
?

The "do while(0)" is used for multi-statment macros, not the case for
void statment!

ciao
giacomo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/