summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-05 23:42:00 -0800
committerJunio C Hamano <gitster@pobox.com>2013-01-05 23:42:00 -0800
commit29fb15152584455590905726cb5a0e26ea26e9eb (patch)
tree569e053cec17633825c9f7bd8df042c88b0600e3 /cache.h
parent946a5aee3e896aa12cb9d4d21079c6e299baad81 (diff)
parenta469a1019352b8efc4bd7003b0bd59eb60fc428c (diff)
downloadgit-29fb15152584455590905726cb5a0e26ea26e9eb.tar.gz
Merge branch 'jk/error-const-return'
Help compilers' flow analysis by making it more explicit that error() always returns -1, to reduce false "variable used uninitialized" warnings. Looks somewhat ugly but not too much. * jk/error-const-return: silence some -Wuninitialized false positives make error()'s constant return value more visible
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 8ceb6b8e8d..e1df1e40dd 100644
--- a/cache.h
+++ b/cache.h
@@ -1145,6 +1145,9 @@ 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__
+#define config_error_nonbool(s) (config_error_nonbool(s), -1)
+#endif
extern const char *get_log_output_encoding(void);
extern const char *get_commit_output_encoding(void);