Skip to content

Commit 393b7c3

Browse files
committed
Merge branch 'jk/error-const-return'
* jk/error-const-return: Use __VA_ARGS__ for all of error's arguments
2 parents 3cc3cf9 + 9798f7e commit 393b7c3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

git-compat-util.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,13 @@ extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)))
305305

306306
/*
307307
* Let callers be aware of the constant return value; this can help
308-
* gcc with -Wuninitialized analysis. We have to restrict this trick to
309-
* gcc, though, because of the variadic macro and the magic ## comma pasting
310-
* behavior. But since we're only trying to help gcc, anyway, it's OK; other
311-
* compilers will fall back to using the function as usual.
308+
* gcc with -Wuninitialized analysis. We restrict this trick to gcc, though,
309+
* because some compilers may not support variadic macros. Since we're only
310+
* trying to help gcc, anyway, it's OK; other compilers will fall back to
311+
* using the function as usual.
312312
*/
313313
#if defined(__GNUC__) && ! defined(__clang__)
314-
#define error(fmt, ...) (error((fmt), ##__VA_ARGS__), -1)
314+
#define error(...) (error(__VA_ARGS__), -1)
315315
#endif
316316

317317
extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));

0 commit comments

Comments
 (0)