X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fliboconfig%2Fscanner.l;h=485800317b57f7189b2ed80aed40e0034e00fae4;hb=be906f960ede42f72317eab6aa6a5f116857a484;hp=638e3a232b3c688970194231b938c911a58b4186;hpb=8c864f5e634118fce2446ebbba96a1cb7ec39dda;p=collectd.git diff --git a/src/liboconfig/scanner.l b/src/liboconfig/scanner.l index 638e3a23..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; @@ -145,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"); } @@ -158,3 +165,6 @@ static void ml_append (char *string) return; } /* ml_append */ +#ifdef __clang__ +#pragma clang diagnostic pop +#endif