[U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
Mike Frysinger
vapier at gentoo.org
Sun Oct 23 07:37:48 CEST 2011
On Fri, Oct 21, 2011 at 20:16, Marek Vasut wrote:
> The current implementation of debug doesn't play well with GCC4.6.
> This implementation also fixes GCC4.6 complaints about unused variables
> while maintaining code size.
i think this patch should come last rather than first that way you fix
all the warnings/failures *before* making the debug() code
unconditional
> +#define debug_cond(cond, fmt, args...) \
> + do { \
> + if (cond) \
> + printf(fmt, ##args); \
> + } while (0)
> +
> +#define debug(fmt, args...) \
> + debug_cond(_DEBUG, fmt, ##args)
> +
> +#define debugX(level, fmt, args...) \
> + debug_cond((_DEBUG && DEBUG >= (level)), fmt, ##args)
i thought we were just going to punt debugX() ?
-mike
More information about the U-Boot
mailing list