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 --- tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tcp.c') diff --git a/tcp.c b/tcp.c index 0d0ad13..3bfcb1c 100644 --- a/tcp.c +++ b/tcp.c @@ -267,6 +267,7 @@ #include #include #include +#include #include #include #include @@ -287,7 +288,6 @@ #include #include #include -#include #include #include /* For struct tcp_info */ -- cgit v1.2.3