summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-02-14 10:29:23 -0800
committerJunio C Hamano <gitster@pobox.com>2013-02-14 10:29:23 -0800
commit393b7c3cd7c87a42e2e477de38d4a6e4981db8bb (patch)
tree144d3a57d03ad1ff416e9d2e3fc4dac6e30132bb
parent3cc3cf970c5ce477bde78df73614d1efba2b52eb (diff)
parent9798f7e5f948b2586c33d850f6a00d4fc0537d75 (diff)
downloadgit-393b7c3cd7c87a42e2e477de38d4a6e4981db8bb.tar.gz
Merge branch 'jk/error-const-return'
* jk/error-const-return: Use __VA_ARGS__ for all of error's arguments
-rw-r--r--git-compat-util.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index cc2abeea0d..b7eaaa99a8 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -305,13 +305,13 @@ extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)))
/*
* Let callers be aware of the constant return value; this can help
- * gcc with -Wuninitialized analysis. We have to restrict this trick to
- * gcc, though, because of the variadic macro and the magic ## comma pasting
- * behavior. But since we're only trying to help gcc, anyway, it's OK; other
- * compilers will fall back to using the function as usual.
+ * gcc with -Wuninitialized analysis. We restrict this trick to gcc, though,
+ * because some compilers may not support variadic macros. Since we're only
+ * 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(fmt, ...) (error((fmt), ##__VA_ARGS__), -1)
+#define error(...) (error(__VA_ARGS__), -1)
#endif
extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));