summaryrefslogtreecommitdiff
path: root/3rdparty/libconfig/extra/gen/clangwarnings.patch
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-06-01 04:08:28 +0200
committerGitHub <noreply@github.com>2020-06-01 04:08:28 +0200
commit36aff97b92f9f42f9bc59911b7d06110a8e9aed5 (patch)
tree69d20dc9137da111ecda664a896bbf0abbead02e /3rdparty/libconfig/extra/gen/clangwarnings.patch
parentb9f7d1439c84b64facaf7d2875adc29110c65cf4 (diff)
parentc66d467fb5816734851b7de6b20537ce7a08c861 (diff)
downloadhercules-36aff97b92f9f42f9bc59911b7d06110a8e9aed5.tar.gz
hercules-36aff97b92f9f42f9bc59911b7d06110a8e9aed5.tar.bz2
hercules-36aff97b92f9f42f9bc59911b7d06110a8e9aed5.tar.xz
hercules-36aff97b92f9f42f9bc59911b7d06110a8e9aed5.zip
Merge pull request #2671 from Helianthella/binliteral
add support for binary and octal number literals
Diffstat (limited to '3rdparty/libconfig/extra/gen/clangwarnings.patch')
-rw-r--r--3rdparty/libconfig/extra/gen/clangwarnings.patch14
1 files changed, 7 insertions, 7 deletions
diff --git a/3rdparty/libconfig/extra/gen/clangwarnings.patch b/3rdparty/libconfig/extra/gen/clangwarnings.patch
index 0270dfc44..ecae69c0e 100644
--- a/3rdparty/libconfig/extra/gen/clangwarnings.patch
+++ b/3rdparty/libconfig/extra/gen/clangwarnings.patch
@@ -10,7 +10,7 @@ index 3595578..26444f8 100644
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_SYMBOL_PRINT (yymsg != NULL ? yymsg : "Deleting", yytype, yyvaluep, yylocationp);
-
+
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yytype);
diff --git a/scanner.c b/scanner.c
@@ -22,15 +22,15 @@ index 60882db..8b8af33 100644
#include <errno.h>
#include <stdlib.h>
+#include <assert.h>
-
+
/* end standard C headers. */
-
+
@@ -1702,6 +1703,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
- libconfig_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
}
-
+
+ assert(YY_CURRENT_BUFFER != NULL); // Fixes compiler warning -Wnull-dereference on gcc-6 and -O3
+
- libconfig_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
- libconfig_yy_load_buffer_state(yyscanner );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
+ yy_load_buffer_state( yyscanner );
}