assert.h: parameter passing fix
See gcc info pages: "Macros with a Variable Number of Arguments."
The ISO-C stadanrd doesn't allow varargs macros to get zero or more
arguments. So this fixes the problem using the gcc extension.
A standard-compliant alternative would be to have "fmt" included in
the variadic part, like this:
#define assert(cond, ...) \
if (CONFIG_HAS_ASSERT && !(cond)) \
__assert(__func__, __LINE__, 1 /* forever */, __VA_ARGS__)
But the reader wouldn't now it's a fmt+args.
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
Please register or sign in to comment