From: Florian Forster Date: Tue, 16 Jun 2015 21:07:34 +0000 (+0200) Subject: liboconfig: Disable some clang warnings. X-Git-Tag: collectd-5.5.1~110^2^2 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=33819a49ab40ec2f54f5ee12b3b88ab4205873eb;p=collectd.git liboconfig: Disable some clang warnings. Hopefully fixes: scanner.c:4128:17: error: unused function 'yyunput' [-Werror,-Wunused-function] static void yyunput (int c, register char * yy_bp ) ^ scanner.c:4173:16: error: function 'input' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static int input (void) ^ 2 errors generated. --- diff --git a/src/liboconfig/scanner.l b/src/liboconfig/scanner.l index 9f0cd8e3..6294ae59 100644 --- a/src/liboconfig/scanner.l +++ b/src/liboconfig/scanner.l @@ -18,6 +18,12 @@ */ %{ +/* 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 "oconfig.h" #include "aux_types.h"