diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2022-09-28 14:33:38 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-09-29 12:23:03 +0200 |
commit | f5d053034c029409115c4daf852d7d118e9bc671 (patch) | |
tree | 1a7bb961361f3e933ac197c50a4aa872a293761f | |
parent | cd05be75fbd4a588c2285bb170b296d5910edf9a (diff) | |
download | passt-f5d053034c029409115c4daf852d7d118e9bc671.tar passt-f5d053034c029409115c4daf852d7d118e9bc671.tar.gz passt-f5d053034c029409115c4daf852d7d118e9bc671.tar.bz2 passt-f5d053034c029409115c4daf852d7d118e9bc671.tar.lz passt-f5d053034c029409115c4daf852d7d118e9bc671.tar.xz passt-f5d053034c029409115c4daf852d7d118e9bc671.tar.zst passt-f5d053034c029409115c4daf852d7d118e9bc671.zip |
Mark unused functions for cppcheck
We have a couple of functions that are unused (for now) by design.
Although at least one has a flag so that gcc doesn't warn, cppcheck has its
own warnings about this. Add specific inline suppressions for these rather
than a blanket suppression in the Makefile.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | igmp.c | 1 | ||||
-rw-r--r-- | siphash.c | 1 |
3 files changed, 2 insertions, 1 deletions
@@ -283,7 +283,6 @@ cppcheck: $(SRCS) $(HEADERS) $(SYSTEM_INCLUDES:%=--suppress=*:%/*) \ $(SYSTEM_INCLUDES:%=--suppress=unmatchedSuppression:%/*) \ --inline-suppr \ - --suppress=unusedFunction \ --suppress=unusedStructMember \ \ --suppress=unmatchedSuppression:dhcp.c \ @@ -13,4 +13,5 @@ */ /* TO BE IMPLEMENTED */ +/* cppcheck-suppress unusedFunction */ __attribute__((__unused__)) static void unused(void) { } @@ -177,6 +177,7 @@ uint64_t siphash_20b(const uint8_t *in, const uint64_t *k) * * Return: the 64-bit hash output */ +/* cppcheck-suppress unusedFunction */ uint32_t siphash_32b(const uint8_t *in, const uint64_t *k) { uint64_t *in64 = (uint64_t *)in; |