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:
@@ -1,13 +1,13 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#include "acl-util.h"
|
||||
#include "alloc-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "log.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "user-util.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#if HAVE_APPARMOR
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
@@ -8,7 +10,6 @@
|
||||
#include "log.h"
|
||||
#include "parse-util.h"
|
||||
|
||||
#if HAVE_APPARMOR
|
||||
static void *libapparmor_dl = NULL;
|
||||
|
||||
DLSYM_PROTOTYPE(aa_change_onexec) = NULL;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
|
||||
#include "blkid-util.h"
|
||||
#include "log.h"
|
||||
#include "parse-util.h"
|
||||
#include "string-util.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "sd-bus.h" /* IWYU pragma: keep */
|
||||
|
||||
#include "shared-forward.h"
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
@@ -11,7 +10,6 @@
|
||||
#include "log.h"
|
||||
#include "memstream-util.h"
|
||||
#include "parse-util.h"
|
||||
#include "process-util.h"
|
||||
#include "sort-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "path-util.h"
|
||||
#include "rm-rf.h"
|
||||
#include "selinux-util.h"
|
||||
#include "set.h"
|
||||
#include "signal-util.h"
|
||||
#include "stat-util.h"
|
||||
#include "stdio-util.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "stdio-util.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "unaligned.h"
|
||||
#include "unaligned.h" /* IWYU pragma: keep */
|
||||
#include "virt.h"
|
||||
|
||||
int set_dumpable(SuidDumpMode mode) {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <sys/file.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-json.h"
|
||||
@@ -32,11 +31,9 @@
|
||||
#include "hashmap.h"
|
||||
#include "hostname-setup.h"
|
||||
#include "id128-util.h"
|
||||
#include "initrd-util.h"
|
||||
#include "lock-util.h"
|
||||
#include "log.h"
|
||||
#include "loop-util.h"
|
||||
#include "mkdir.h"
|
||||
#include "namespace-util.h"
|
||||
#include "nsresource.h"
|
||||
#include "nulstr-util.h"
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bitmap.h"
|
||||
#include "dns-answer.h"
|
||||
#include "dns-answer.h" /* IWYU pragma: keep */
|
||||
#include "dns-domain.h"
|
||||
#include "dns-packet.h"
|
||||
#include "dns-rr.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "stat-util.h"
|
||||
#include "stdio-util.h"
|
||||
#include "string-util.h"
|
||||
#include "tpm2-util.h"
|
||||
#include "tpm2-util.h" /* IWYU pragma: keep */
|
||||
#include "utf8.h"
|
||||
|
||||
#define EFI_TCG2_BOOT_HASH_ALG_SHA1 0x01
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "dlfcn-util.h"
|
||||
#include "idn-util.h"
|
||||
#include "log.h"
|
||||
#include "log.h" /* IWYU pragma: keep */
|
||||
|
||||
#if HAVE_LIBIDN || HAVE_LIBIDN2
|
||||
static void* idn_dl = NULL;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <syslog.h>
|
||||
|
||||
#include "libarchive-util.h"
|
||||
#include "user-util.h"
|
||||
#include "user-util.h" /* IWYU pragma: keep */
|
||||
|
||||
#if HAVE_LIBARCHIVE
|
||||
static void *libarchive_dl = NULL;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "errno-util.h"
|
||||
#include "libcrypt-util.h"
|
||||
#include "log.h"
|
||||
#include "random-util.h"
|
||||
#include "random-util.h" /* IWYU pragma: keep */
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "shared-forward.h"
|
||||
#include "static-destruct.h"
|
||||
#include "static-destruct.h" /* IWYU pragma: keep */
|
||||
|
||||
void main_prepare(int argc, char *argv[]);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "errno-util.h"
|
||||
#include "label-util.h"
|
||||
#include "label-util.h" /* IWYU pragma: keep */
|
||||
#include "mkdir-label.h"
|
||||
#include "selinux-util.h"
|
||||
#include "smack-util.h"
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "password-quality-util-passwdqc.h"
|
||||
|
||||
#if HAVE_PASSWDQC
|
||||
|
||||
#include <passwdqc.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dlfcn-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "log.h"
|
||||
#include "memory-util.h"
|
||||
#include "password-quality-util-passwdqc.h"
|
||||
#include "strv.h"
|
||||
|
||||
#if HAVE_PASSWDQC
|
||||
|
||||
static void *passwdqc_dl = NULL;
|
||||
|
||||
DLSYM_PROTOTYPE(passwdqc_params_reset) = NULL;
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include "shared-forward.h"
|
||||
|
||||
#if HAVE_PASSWDQC
|
||||
#include <passwdqc.h>
|
||||
|
||||
int suggest_passwords(void);
|
||||
int check_password_quality(const char *password, const char *old, const char *username, char **ret_error);
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "password-quality-util-pwquality.h"
|
||||
|
||||
#if HAVE_PWQUALITY
|
||||
|
||||
#include <pwquality.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -8,12 +13,9 @@
|
||||
#include "errno-util.h"
|
||||
#include "log.h"
|
||||
#include "password-quality-util.h"
|
||||
#include "password-quality-util-pwquality.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
#if HAVE_PWQUALITY
|
||||
|
||||
static void *pwquality_dl = NULL;
|
||||
|
||||
DLSYM_PROTOTYPE(pwquality_check) = NULL;
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include "shared-forward.h"
|
||||
|
||||
#if HAVE_PWQUALITY
|
||||
#include <pwquality.h>
|
||||
|
||||
int suggest_passwords(void);
|
||||
int check_password_quality(const char *password, const char *old, const char *username, char **ret_error);
|
||||
#endif
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "log.h"
|
||||
#include "parse-util.h"
|
||||
#include "reread-partition-table.h"
|
||||
#include "set.h"
|
||||
#include "string-util.h"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "securebits-util.h"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <sched.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
+3
-4
@@ -4,14 +4,13 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "errno-list.h"
|
||||
#include "errno-util.h"
|
||||
#include "shared-forward.h"
|
||||
#include "log.h"
|
||||
#include "log-assert-critical.h"
|
||||
#include "static-destruct.h"
|
||||
#include "signal-util.h"
|
||||
#include "static-destruct.h" /* IWYU pragma: keep*/
|
||||
#include "signal-util.h" /* IWYU pragma: keep*/
|
||||
#include "stdio-util.h"
|
||||
#include "string-util.h"
|
||||
#include "string-util.h" /* IWYU pragma: keep */
|
||||
|
||||
static inline void log_set_assert_return_is_criticalp(bool *p) {
|
||||
log_set_assert_return_is_critical(*p);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "shared-forward.h"
|
||||
#include "tpm2-util.h"
|
||||
#include "tpm2-util.h" /* IWYU pragma: keep */
|
||||
|
||||
/* Definitions as per "TCG PC Client Specific Platform Firmware Profile Specification"
|
||||
* (https://trustedcomputinggroup.org/resource/pc-client-specific-platform-firmware-profile-specification/),
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "alloc-util.h"
|
||||
#include "ansi-color.h"
|
||||
#include "bitfield.h"
|
||||
#include "bootspec.h"
|
||||
#include "boot-entry.h"
|
||||
#include "constants.h"
|
||||
#include "creds-util.h"
|
||||
@@ -14,7 +13,6 @@
|
||||
#include "dirent-util.h"
|
||||
#include "dlfcn-util.h"
|
||||
#include "efi-api.h"
|
||||
#include "errno-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
@@ -42,7 +40,6 @@
|
||||
#include "sync-util.h"
|
||||
#include "time-util.h"
|
||||
#include "tpm2-pcr.h"
|
||||
#include "tmpfile-util.h"
|
||||
#include "tpm2-util.h"
|
||||
#include "virt.h"
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "build.h"
|
||||
#include "varlink-idl-common.h"
|
||||
#include "varlink-io.systemd.Unit.h"
|
||||
|
||||
/* CGroupContext */
|
||||
static SD_VARLINK_DEFINE_STRUCT_TYPE(
|
||||
|
||||
Reference in New Issue
Block a user