From 69f0e85785e03ef344e56c16929a9e803c2894ab Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 20 Feb 2024 16:07:37 +0100 Subject: [PATCH] af-xdp: suppress cppcheck false positive As the cppcheck test suite does as well: https://github.com/danmar/cppcheck/blob/main/test/cfg/posix.c#L311 Requires cppcheck --inline-suppr option to be used. --- src/source-af-xdp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/source-af-xdp.c b/src/source-af-xdp.c index 17fa0efeec..b69fd497dc 100644 --- a/src/source-af-xdp.c +++ b/src/source-af-xdp.c @@ -580,6 +580,7 @@ static inline ssize_t WakeupSocket(void *data) /* Assuming kernel >= 5.11 in use if xdp_busy_poll is enabled */ if (ptv->xsk.enable_busy_poll || xsk_ring_prod__needs_wakeup(&ptv->umem.fq)) { + // cppcheck-suppress nullPointer res = recvfrom(xsk_socket__fd(ptv->xsk.xsk), NULL, 0, MSG_DONTWAIT, NULL, NULL); } -- 2.47.2