mirror of
https://github.com/git/git.git
synced 2024-10-28 12:59:41 +01:00
Merge branch 'jk/suppress-clang-warning'
* jk/suppress-clang-warning: fix clang -Wunused-value warnings for error functions
This commit is contained in:
commit
fa2f83c654
3 changed files with 3 additions and 3 deletions
2
cache.h
2
cache.h
|
@ -1147,7 +1147,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_env_bool(const char *, int);
|
||||||
extern int git_config_system(void);
|
extern int git_config_system(void);
|
||||||
extern int config_error_nonbool(const char *);
|
extern int config_error_nonbool(const char *);
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && ! defined(__clang__)
|
||||||
#define config_error_nonbool(s) (config_error_nonbool(s), -1)
|
#define config_error_nonbool(s) (config_error_nonbool(s), -1)
|
||||||
#endif
|
#endif
|
||||||
extern const char *get_log_output_encoding(void);
|
extern const char *get_log_output_encoding(void);
|
||||||
|
|
|
@ -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
|
* 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.
|
* 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)
|
#define error(fmt, ...) (error((fmt), ##__VA_ARGS__), -1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ extern NORETURN void usage_msg_opt(const char *msg,
|
||||||
|
|
||||||
extern int optbug(const struct option *opt, const char *reason);
|
extern int optbug(const struct option *opt, const char *reason);
|
||||||
extern int opterror(const struct option *opt, const char *reason, int flags);
|
extern int opterror(const struct option *opt, const char *reason, int flags);
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && ! defined(clang)
|
||||||
#define opterror(o,r,f) (opterror((o),(r),(f)), -1)
|
#define opterror(o,r,f) (opterror((o),(r),(f)), -1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue