X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fliboconfig%2Fscanner.l;h=7a831c2a8f63390e8435adca419867c1a5604fc9;hb=b81104a423234c04f0eb4ace0ec5e93a363c917a;hp=08524fd84a4a775dd778c9eb1d873f7935739d11;hpb=81a5fd5046c6a39f580a8fc1a3af837fd5f5aa5c;p=collectd.git diff --git a/src/liboconfig/scanner.l b/src/liboconfig/scanner.l index 08524fd8..7a831c2a 100644 --- a/src/liboconfig/scanner.l +++ b/src/liboconfig/scanner.l @@ -27,13 +27,8 @@ */ %{ -/* lex and yacc do some weird stuff, so turn off some warnings. */ -#if defined(__clang__) -# pragma clang diagnostic ignored "-Wunused-function" -# pragma clang diagnostic ignored "-Wunneeded-internal-declaration" -#endif - #include +#include #include "oconfig.h" #include "aux_types.h" #include "parser.h" @@ -56,6 +51,8 @@ static void ml_append (char *); %} %option yylineno %option noyywrap +%option noinput +%option nounput %x ML WHITE_SPACE [\ \t\b] NON_WHITE_SPACE [^\ \t\b] @@ -149,7 +146,7 @@ static void ml_append (char *string) if (ml_free <= len) { ml_len += len - ml_free + 1; - ml_buffer = (char *)realloc (ml_buffer, ml_len); + ml_buffer = realloc (ml_buffer, ml_len); if (NULL == ml_buffer) YY_FATAL_ERROR ("out of dynamic memory in ml_append"); }