> Its valid (although admittedly dubious) to have BUG_ON with > side-effects. > > The 'right' fix would be something like: > > --- > #ifndef BUG_ON > +#ifdef NDEBUG > +#define BUG_ON(cond) do { if (cond) ; } while (0) > +#else > #define BUG_ON(cond) assert(!(cond)) > #endif > +#endif >
This is indeed the right fix. I will use this approach, test it and resubmit. Thanks, Irina -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/