]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fix expansion-to-defined warnings (GCC 7) 857/head
authorWolfgang Stöggl <c72578@yahoo.de>
Tue, 2 Jan 2018 10:04:40 +0000 (11:04 +0100)
committerWolfgang Stöggl <c72578@yahoo.de>
Tue, 2 Jan 2018 10:04:40 +0000 (11:04 +0100)
- Fixed compiler warnings:
  gettext.h:176:6: warning: this use of "defined" may not be portable
  [-Wexpansion-to-defined] #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
  gettext.h:200:5: warning: this use of "defined" may not be portable
  [-Wexpansion-to-defined] #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
  gettext.h:215:6: warning: this use of "defined" may not be portable
  [-Wexpansion-to-defined] #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
  gettext.h:246:5: warning: this use of "defined" may not be portable
  [-Wexpansion-to-defined] #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
  gettext.h:261:6: warning: this use of "defined" may not be portable
  [-Wexpansion-to-defined] #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS

src/gettext.h

index 4aef2ef0c7270d30c9c34de1b677f469b314c316..0d225bbbea0901cd542cbfb6c87bbfa952a7a6fe 100644 (file)
@@ -169,9 +169,11 @@ npgettext_aux (const char *domain,
 
 #include <string.h>
 
-#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
-  (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
-   /* || __STDC_VERSION__ >= 199901L */ )
+#if ((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__)
+#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
+#else
+#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
+#endif
 
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
 #include <stdlib.h>