]> git.ipfire.org Git - thirdparty/suricata.git/commit
qa/coccinelle: fix false positive in setter getter
authorEric Leblond <eric@regit.org>
Sat, 30 Nov 2019 16:20:44 +0000 (17:20 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 5 Dec 2019 12:40:02 +0000 (13:40 +0100)
commit3ded7f1170f7ab1a5b6f0fa58c04cb2949ec525f
treed9e2f31009a29dfb25980ced0d4c1a96a265b2af
parentf745f0655b36f6ef1caf2ae057f822038d1d44d9
qa/coccinelle: fix false positive in setter getter

Coccinelle test was doing a false positive on the function
AppLayerParserStateSetFlag and AppLayerParserStateIssetFlag.
To address that, this patch adds a new coccinelle markup:

 /* coccinelle: AppLayerParserStateSetFlag():2,2:APP_LAYER_PARSER_ */

It indicates that AppLayerParserStateSetFlag is a setter and getter
and that the checks should be disabled inside the function.

Currently this markup is only used for that but following patch will
add some checks on option value.
qa/coccinelle/struct-flags.py
src/app-layer-parser.c