From 2cbec43b98582e04ffd8e638701c24b33c30263f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sat, 3 May 2025 11:10:00 +0200 Subject: [PATCH] mpm/ac-ks: allow cppcheck to inspect included file directly --- src/util-mpm-ac-ks-small.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 * */