From 1ec890a76b1f97e65ee2802a15ef8331f6b6a281 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 11 Apr 2018 13:33:12 -0400 Subject: [PATCH] lib: ignore cli lexer in clang-analyze Lexer code is generated by Flex and we don't care about false positives in it. Signed-off-by: Quentin Young --- lib/command_lex.l | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/command_lex.l b/lib/command_lex.l index 530900659b..0d6e6ee7e5 100644 --- a/lib/command_lex.l +++ b/lib/command_lex.l @@ -23,6 +23,9 @@ */ %{ +/* ignore flex generated code in static analyzer */ +#ifndef __clang_analyzer__ + /* ignore harmless bugs in old versions of flex */ #pragma GCC diagnostic ignored "-Wsign-compare" #pragma GCC diagnostic ignored "-Wmissing-prototypes" @@ -91,3 +94,5 @@ void cleanup_lexer (yyscan_t *scn) // yy_delete_buffer (buffer, *scn); yylex_destroy(*scn); } + +#endif /* __clang_analyzer__ */