Skip to content

Commit 642f85f

Browse files
Ramsay Jonesgitster
authored andcommitted
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 <[email protected]> Acked-by: Jonathan Nieder <[email protected]> Acked-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e3fa246 commit 642f85f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gettext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ const char *Q_(const char *msgid, const char *plu, unsigned long n)
3535
}
3636

3737
/* Mark msgid for translation but do not translate it. */
38-
#define N_(msgid) (msgid)
38+
#define N_(msgid) msgid
3939

4040
#endif

0 commit comments

Comments
 (0)