Merge branch 'jk/squelch-compiler-warning-from-funny-error-macro'
* jk/squelch-compiler-warning-from-funny-error-macro: let clang use the constant-return error() macro inline constant return from error() function
This commit is contained in:
@ -330,8 +330,12 @@ extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)))
|
||||
* trying to help gcc, anyway, it's OK; other compilers will fall back to
|
||||
* using the function as usual.
|
||||
*/
|
||||
#if defined(__GNUC__) && ! defined(__clang__)
|
||||
#define error(...) (error(__VA_ARGS__), -1)
|
||||
#if defined(__GNUC__)
|
||||
static inline int const_error(void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#define error(...) (error(__VA_ARGS__), const_error())
|
||||
#endif
|
||||
|
||||
extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));
|
||||
|
Reference in New Issue
Block a user