clang-tidy: Fix all remaining misc-include-cleaner violations

- Remove unused includes
- Add common false positive headers to misc-include-cleaner.IgnoreHeaders
- Add IWYU pragma keep for uncommon false positive headers
This commit is contained in:
Daan De Meyer
2025-11-22 10:19:41 +01:00
parent d11ce97386
commit 87fbd33372
123 changed files with 138 additions and 147 deletions
@@ -7,7 +7,7 @@
* fine given that LGPL-2.1-or-later downgrades to GPL if needed.
*/
#include "bpf-dlopen.h"
#include "bpf-dlopen.h" /* IWYU pragma: keep */
/* libbpf is used via dlopen(), so rename symbols */
#define bpf_object__attach_skeleton sym_bpf_object__attach_skeleton
@@ -15,4 +15,4 @@
#define bpf_object__load_skeleton sym_bpf_object__load_skeleton
#define bpf_object__open_skeleton sym_bpf_object__open_skeleton
#include "bpf/userns-restrict/userns-restrict.skel.h"
#include "bpf/userns-restrict/userns-restrict.skel.h" /* IWYU pragma: export */
+1 -1
View File
@@ -8,6 +8,7 @@
#include "bpf-dlopen.h"
#if HAVE_VMLINUX_H
#include "bpf-link.h"
#include "bpf/userns-restrict/userns-restrict-skel.h"
#endif
#include "build-path.h"
#include "common-signal.h"
@@ -26,7 +27,6 @@
#include "set.h"
#include "signal-util.h"
#include "socket-util.h"
#include "stdio-util.h"
#include "string-util.h"
#include "strv.h"
#include "time-util.h"
+4
View File
@@ -2,6 +2,10 @@
#include <sys/stat.h>
#if HAVE_VMLINUX_H
#include "bpf/userns-restrict/userns-restrict-skel.h"
#endif
#include "bpf-dlopen.h"
#include "bpf-link.h"
#include "fd-util.h"
-4
View File
@@ -3,11 +3,7 @@
#include "shared-forward.h"
#if HAVE_VMLINUX_H
#include "bpf/userns-restrict/userns-restrict-skel.h"
#else
struct userns_restrict_bpf;
#endif
int userns_restrict_install(bool pin, struct userns_restrict_bpf **ret);
struct userns_restrict_bpf *userns_restrict_bpf_free(struct userns_restrict_bpf *obj);