]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
mpm/ac-ks: allow cppcheck to inspect included file directly
authorVictor Julien <vjulien@oisf.net>
Sat, 3 May 2025 09:10:00 +0000 (11:10 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 5 May 2025 19:41:02 +0000 (21:41 +0200)
src/util-mpm-ac-ks-small.c

index 44f51d02b9fbec020daf31c1fefe502694d7b3da..43e131861da3822d27023d1e051153db5d33bd64 100644 (file)
  *
  */
 
+/* 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
  *
  */