summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-04-11 13:33:12 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-04-13 17:17:42 -0400
commit1ec890a76b1f97e65ee2802a15ef8331f6b6a281 (patch)
treeb17b57b26814f68e8e81b7555ba6cdbe1eb6ddb4
parent988258b4270733d1dcefd884256028f647c759e2 (diff)
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 <qlyoung@cumulusnetworks.com>
-rw-r--r--lib/command_lex.l5
1 files changed, 5 insertions, 0 deletions
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__ */