X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fliboconfig%2Fscanner.l;h=485800317b57f7189b2ed80aed40e0034e00fae4;hb=d4a0fddd3a63ad75fb3e762a954fc9db57582f00;hp=cb3754d7d7c4ef529cef75042125c12dba3dc893;hpb=f664b944f774e4d1e5d5c562eaf0bb207c6a7edf;p=collectd.git diff --git a/src/liboconfig/scanner.l b/src/liboconfig/scanner.l index cb3754d7..48580031 100644 --- a/src/liboconfig/scanner.l +++ b/src/liboconfig/scanner.l @@ -28,10 +28,17 @@ %{ #include +#include #include "oconfig.h" #include "aux_types.h" #include "parser.h" +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wmissing-noreturn" +#endif + + /* multiline string buffer */ static char *ml_buffer = NULL; static int ml_pos = 0; @@ -50,6 +57,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] @@ -143,7 +152,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"); } @@ -156,3 +165,6 @@ static void ml_append (char *string) return; } /* ml_append */ +#ifdef __clang__ +#pragma clang diagnostic pop +#endif