From 33819a49ab40ec2f54f5ee12b3b88ab4205873eb Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 16 Jun 2015 23:07:34 +0200 Subject: [PATCH] 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. --- src/liboconfig/scanner.l | 6 ++++++ 1 file changed, 6 insertions(+) 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" -- 2.11.0