From 34ade90957ddc5086cc17dc1af47ca640aa650e5 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Tue, 21 Mar 2023 14:54:59 +1100 Subject: Work around weird false positives with cppcheck-2.9.1 Commit 89e38f55 "treewide: Fix header includes to build with musl" added extra #includes to work with musl. Unfortunately with the cppcheck version I'm using (cppcheck-2.9-1.fc37.x86_64 in Fedora 37) this causes weird false positives: specifically cppcheck seems to hit a #error in complaining about including it directly instead of via (which is not something we're doing). I have no idea why that would be happening; but I'm guessing it has to be a bug in the cpp implementation in that cppcheck version. In any case, it's possible to work around this by moving the include of before the include of . So, do that. Fixes: 89e38f55405d ("treewide: Fix header includes to build with musl") Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'udp.c') diff --git a/udp.c b/udp.c index 45c8d40..ddf01db 100644 --- a/udp.c +++ b/udp.c @@ -91,6 +91,7 @@ */ #include +#include #include #include #include @@ -107,7 +108,6 @@ #include #include #include -#include #include #include "checksum.h" -- cgit v1.2.3