]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: ignore cli lexer in clang-analyze
authorQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 11 Apr 2018 17:33:12 +0000 (13:33 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 13 Apr 2018 21:17:42 +0000 (17:17 -0400)
Lexer code is generated by Flex and we don't care about false positives
in it.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
lib/command_lex.l

index 530900659b6c9edd2b95a95cc15044d29f3b8ad0..0d6e6ee7e5fc60b0ac55918d38acc258face2219 100644 (file)
@@ -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__ */