aboutgitcodebugslistschat
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-09-28 14:33:28 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-09-29 12:22:23 +0200
commit6ce68113e38bd91ed9d31741a380972b34cbced6 (patch)
treeb1bf6623f393e1726053e75f26521ad83f5db63a /Makefile
parent656acdfc26b0a03329db005e41d0aaf789afca29 (diff)
downloadpasst-6ce68113e38bd91ed9d31741a380972b34cbced6.tar
passt-6ce68113e38bd91ed9d31741a380972b34cbced6.tar.gz
passt-6ce68113e38bd91ed9d31741a380972b34cbced6.tar.bz2
passt-6ce68113e38bd91ed9d31741a380972b34cbced6.tar.lz
passt-6ce68113e38bd91ed9d31741a380972b34cbced6.tar.xz
passt-6ce68113e38bd91ed9d31741a380972b34cbced6.tar.zst
passt-6ce68113e38bd91ed9d31741a380972b34cbced6.zip
cppcheck: Broaden suppression for unused struct members
In a number of places in passt we use structures to represent over the wire or in-file data with a fixed layout. After initialization we don't access the fields individually and just write the structure as a whole to its destination. Unfortunately cppcheck doesn't cope with this pattern and thinks all the structure members are unused. We already have suppressions for this in pcap.c and dhcp.c However, it also appears in dhcp.c and netlink.c at least. Since this is likely to be common, it seems wiser to just suppress the error globally. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 1 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 7c0b7e9..e3ca17f 100644
--- a/Makefile
+++ b/Makefile
@@ -286,10 +286,9 @@ cppcheck: $(SRCS) $(HEADERS)
--suppress=objectIndex:tcp.c --suppress=objectIndex:udp.c \
--suppress=va_list_usedBeforeStarted:util.c \
--suppress=unusedFunction \
+ --suppress=unusedStructMember \
--suppress=knownConditionTrueFalse:conf.c \
--suppress=localtimeCalled:pcap.c \
- --suppress=unusedStructMember:pcap.c \
- --suppress=unusedStructMember:dhcp.c \
\
--suppress=unmatchedSuppression:conf.c \
--suppress=unmatchedSuppression:dhcp.c \