diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-05 23:42:00 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-05 23:42:00 -0800 |
commit | 29fb15152584455590905726cb5a0e26ea26e9eb (patch) | |
tree | 569e053cec17633825c9f7bd8df042c88b0600e3 /cache.h | |
parent | 946a5aee3e896aa12cb9d4d21079c6e299baad81 (diff) | |
parent | a469a1019352b8efc4bd7003b0bd59eb60fc428c (diff) | |
download | git-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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |