git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix some clang warnings
@ 2013-01-16 14:53 Max Horn
  2013-01-16 16:04 ` Jeff King
  0 siblings, 1 reply; 35+ messages in thread
From: Max Horn @ 2013-01-16 14:53 UTC (permalink / raw)
  To: git; +Cc: Johannes Sixt, Jeff King, Max Horn


Signed-off-by: Max Horn <max@quendi.de>
---
 cache.h           | 2 +-
 git-compat-util.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cache.h b/cache.h
index c257953..5c8440b 100644
--- a/cache.h
+++ b/cache.h
@@ -1148,7 +1148,7 @@ extern int check_repository_format_version(const char *var, const char *value, v
 extern int git_env_bool(const char *, int);
 extern int git_config_system(void);
 extern int config_error_nonbool(const char *);
-#ifdef __GNUC__
+#if defined(__GNUC__) && ! defined(__clang__)
 #define config_error_nonbool(s) (config_error_nonbool(s), -1)
 #endif
 extern const char *get_log_output_encoding(void);
diff --git a/git-compat-util.h b/git-compat-util.h
index 4f022a3..cc2abee 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -310,7 +310,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
 
-- 
1.8.1.1.435.g4e2ebdf

^ permalink raw reply related	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2013-02-01  5:46 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16 14:53 [PATCH] fix some clang warnings Max Horn
2013-01-16 16:04 ` Jeff King
2013-01-16 16:53   ` Junio C Hamano
2013-01-16 17:12     ` Antoine Pelisse
2013-01-16 17:18       ` John Keeping
2013-01-16 17:26         ` Max Horn
2013-01-16 17:50           ` Jeff King
2013-01-16 18:00             ` Jeff King
2013-01-16 18:09               ` Jeff King
2013-01-16 18:12               ` John Keeping
2013-01-16 18:15                 ` Jeff King
2013-01-16 18:21                   ` Antoine Pelisse
2013-01-16 18:22                   ` John Keeping
2013-01-16 18:24                     ` Jeff King
2013-01-16 19:01                       ` John Keeping
2013-01-17 10:24                         ` John Keeping
2013-01-16 22:47                       ` [PATCH 1/2] fix clang -Wconstant-conversion with bit fields Antoine Pelisse
2013-01-16 22:47                         ` [PATCH 2/2] fix clang -Wtautological-compare with unsigned enum Antoine Pelisse
2013-01-16 23:10                           ` Antoine Pelisse
2013-01-17 10:32                           ` Antoine Pelisse
2013-01-17 11:00                             ` John Keeping
2013-01-17 11:23                               ` [PATCH] combine-diff: suppress a clang warning John Keeping
2013-01-17 16:44                               ` [PATCH 2/2] fix clang -Wtautological-compare with unsigned enum Linus Torvalds
2013-01-17 16:56                                 ` Antoine Pelisse
2013-01-17 17:02                                 ` John Keeping
2013-01-18 17:15                                 ` Phil Hord
2013-01-18 18:52                                   ` Linus Torvalds
2013-01-16 23:08                         ` [PATCH 1/2] fix clang -Wconstant-conversion with bit fields John Keeping
2013-01-16 23:09                           ` Antoine Pelisse
2013-01-16 23:15                             ` Antoine Pelisse
2013-01-16 23:43                         ` Junio C Hamano
2013-01-16 23:46                           ` Junio C Hamano
2013-01-16 18:03             ` [PATCH] fix some clang warnings Tomas Carnecky
2013-01-16 18:12             ` Matthieu Moy
2013-02-01  5:37             ` Miles Bader

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).