From: Victor Julien Date: Sat, 3 May 2025 09:10:00 +0000 (+0200) Subject: mpm/ac-ks: allow cppcheck to inspect included file directly X-Git-Tag: suricata-8.0.0-rc1~359 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2cbec43b98582e04ffd8e638701c24b33c30263f;p=thirdparty%2Fsuricata.git mpm/ac-ks: allow cppcheck to inspect included file directly --- diff --git a/src/util-mpm-ac-ks-small.c b/src/util-mpm-ac-ks-small.c index 44f51d02b9..43e131861d 100644 --- a/src/util-mpm-ac-ks-small.c +++ b/src/util-mpm-ac-ks-small.c @@ -25,6 +25,17 @@ * */ +/* allow cppcheck to inspect this file directly */ +#ifdef CPPCHECK +#ifndef FUNC_NAME +#define SINDEX_INTERNAL(y, x, log_mult, width) ((1 << log_mult) * (x & ((1 << width) - 1))) +#define STYPE int16_t +#define SLOAD(x) *(STYPE *restrict)(x) +#define FUNC_NAME SCACTileSearchSmall256 +#define SINDEX(y, x) SINDEX_INTERNAL(y, x, 8, 15) +#endif +#endif + /* Only included into util-mpm-ac-ks.c, which defines FUNC_NAME * */