diff options
Diffstat (limited to '3rdparty/libconfig/scanner.c')
-rw-r--r-- | 3rdparty/libconfig/scanner.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/3rdparty/libconfig/scanner.c b/3rdparty/libconfig/scanner.c index 687b52dbe..cfdd02ccf 100644 --- a/3rdparty/libconfig/scanner.c +++ b/3rdparty/libconfig/scanner.c @@ -21,6 +21,7 @@ #include <string.h> #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); } + 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 ); } |