path: root/usage.c
diff options
authorJeff King <>2016-08-31 03:41:22 (GMT)
committerJunio C Hamano <>2016-08-31 18:11:54 (GMT)
commit4df5e91867498f7c6ee4bf5a464a5c24dc89034b (patch)
tree6d0ef57051d909f5049564172cee78e5b5ffd811 /usage.c
parente0c1ceafc5bece92d35773a75fff59497e1d9bd5 (diff)
error_errno: use constant return similar to error()
Commit e208f9c (make error()'s constant return value more visible, 2012-12-15) introduced some macro trickery to make the constant return from error() more visible to callers, which in turn can help gcc produce better warnings (and possibly even better code). Later, fd1d672 (usage.c: add warning_errno() and error_errno(), 2016-05-08) introduced another variant, and subsequent commits converted some uses of error() to error_errno(), losing the magic from e208f9c for those sites. As a result, compiling vcs-svn/svndiff.c with "gcc -O3" produces -Wmaybe-uninitialized false positives (at least with gcc 6.2.0). Let's give error_errno() the same treatment, which silences these warnings. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'usage.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/usage.c b/usage.c
index 1dad03f..0efa3fa 100644
--- a/usage.c
+++ b/usage.c
@@ -148,6 +148,7 @@ void NORETURN die_errno(const char *fmt, ...)
+#undef error_errno
int error_errno(const char *fmt, ...)
char buf[1024];