summaryrefslogtreecommitdiffstats
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-24 06:19:00 +0100
committerJunio C Hamano <gitster@pobox.com>2013-01-24 06:19:00 +0100
commitfa2f83c654f36d666ef7c07e40e0d62a02fbfa06 (patch)
treef981d03f16b567c8fe6f9ef76727275390d8d89a /git-compat-util.h
parentMerge branch 'cr/push-force-tag-update' (diff)
parentfix clang -Wunused-value warnings for error functions (diff)
downloadgit-fa2f83c654f36d666ef7c07e40e0d62a02fbfa06.tar.xz
git-fa2f83c654f36d666ef7c07e40e0d62a02fbfa06.zip
Merge branch 'jk/suppress-clang-warning'
* jk/suppress-clang-warning: fix clang -Wunused-value warnings for error functions
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index e5a4b7450b..dab545e02e 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -297,7 +297,7 @@ extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)))
* 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.
*/
-#ifdef __GNUC__
+#if defined(__GNUC__) && ! defined(__clang__)
#define error(fmt, ...) (error((fmt), ##__VA_ARGS__), -1)
#endif