@matheusbsbs / matheus-bagliano / commits / 642f85faab
Fork 0

i18n: avoid parenthesized string as array initializer

The syntax static const char ignore_error[] = ("something"); is invalid C. A parenthesized string is not allowed as an array initializer. Some compilers, for example GCC and MSVC, allow this syntax as an extension, but it is not a portable construct. tcc does not parse it, for example. Remove the parenthesis from the definition of the N_() macro to fix this. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ramsay Jones committed Apr 7, 2011 at 19:41 UTC 642f85faab27adec13eced36cd7e7548311f6c87
1 file changed +1 -1
gettext.h
+1 -1
@@ -35,6 +35,6 @@ const char *Q_(const char *msgid, const char *plu, unsigned long n)
35 }
36
37 /* Mark msgid for translation but do not translate it. */
38 -#define N_(msgid) (msgid)
38 +#define N_(msgid) msgid
39
40 #endif