Re: [patch] ALSA compiler warnings fixes

From: Giacomo Catenazzi (cate@debian.org)
Date: Tue Nov 19 2002 - 06:30:21 EST


> +#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/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:27 EST