Merge branch 'es/utf8-stupid-compiler-workaround' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 15 Jul 2015 18:41:23 +0000 (11:41 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jul 2015 18:41:23 +0000 (11:41 -0700)
A compilation workaround.

* es/utf8-stupid-compiler-workaround:
  utf8: NO_ICONV: silence uninitialized variable warning

utf8.h

diff --git a/utf8.h b/utf8.h
index e7b2aa4..5a9e94b 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -31,7 +31,9 @@ char *reencode_string_len(const char *in, int insz,
                          const char *in_encoding,
                          int *outsz);
 #else
-#define reencode_string_len(a,b,c,d,e) NULL
+static inline char *reencode_string_len(const char *a, int b,
+                                       const char *c, const char *d, int *e)
+{ if (e) *e = 0; return NULL; }
 #endif
 
 static inline char *reencode_string(const char *in,