diff --git a/base/cvd/cuttlefish/host/libs/audio_connector/BUILD.bazel b/base/cvd/cuttlefish/host/libs/audio_connector/BUILD.bazel index 087b68da4c3..b90fba607a0 100644 --- a/base/cvd/cuttlefish/host/libs/audio_connector/BUILD.bazel +++ b/base/cvd/cuttlefish/host/libs/audio_connector/BUILD.bazel @@ -17,12 +17,9 @@ cf_cc_library( "server.h", "shm_layout.h", ], - depend_on_what_you_use_enabled = False, - include_cleaner_enabled = False, deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:cf_endian", - "//libbase", "@abseil-cpp//absl/log", "@abseil-cpp//absl/log:check", ], diff --git a/base/cvd/cuttlefish/host/libs/audio_connector/buffers.cpp b/base/cvd/cuttlefish/host/libs/audio_connector/buffers.cpp index 033f2ba1352..e726eef930f 100644 --- a/base/cvd/cuttlefish/host/libs/audio_connector/buffers.cpp +++ b/base/cvd/cuttlefish/host/libs/audio_connector/buffers.cpp @@ -15,8 +15,14 @@ #include "cuttlefish/host/libs/audio_connector/buffers.h" +#include + +#include + #include "absl/log/check.h" +#include "cuttlefish/host/libs/audio_connector/shm_layout.h" + namespace cuttlefish { ShmBuffer::ShmBuffer(const virtio_snd_pcm_xfer& header, diff --git a/base/cvd/cuttlefish/host/libs/audio_connector/commands.cpp b/base/cvd/cuttlefish/host/libs/audio_connector/commands.cpp index 5b85960a60b..3975cf4ebbb 100644 --- a/base/cvd/cuttlefish/host/libs/audio_connector/commands.cpp +++ b/base/cvd/cuttlefish/host/libs/audio_connector/commands.cpp @@ -15,8 +15,11 @@ #include "cuttlefish/host/libs/audio_connector/commands.h" +#include +#include + #include -#include +#include #include #include "absl/log/check.h" diff --git a/base/cvd/cuttlefish/host/libs/audio_connector/server.cpp b/base/cvd/cuttlefish/host/libs/audio_connector/server.cpp index eb0f65807ba..c6bfd9767b1 100644 --- a/base/cvd/cuttlefish/host/libs/audio_connector/server.cpp +++ b/base/cvd/cuttlefish/host/libs/audio_connector/server.cpp @@ -15,16 +15,26 @@ #include "cuttlefish/host/libs/audio_connector/server.h" -#include -#include -#include - +#include +#include +#include +#include +#include + +#include +#include +#include #include #include #include "absl/log/check.h" #include "absl/log/log.h" +#include "cuttlefish/common/libs/fs/shared_fd.h" +#include "cuttlefish/host/libs/audio_connector/buffers.h" +#include "cuttlefish/host/libs/audio_connector/commands.h" +#include "cuttlefish/host/libs/audio_connector/shm_layout.h" + namespace cuttlefish { namespace { @@ -440,9 +450,9 @@ bool AudioClientConnection::CmdReply(AudioStatus status, const void* data, .code = Le32(static_cast(status)), }; std::vector buffer(sizeof(vio_status) + size, 0); - std::memcpy(buffer.data(), &vio_status, sizeof(vio_status)); + memcpy(buffer.data(), &vio_status, sizeof(vio_status)); if (data) { - std::memcpy(buffer.data() + sizeof(vio_status), data, size); + memcpy(buffer.data() + sizeof(vio_status), data, size); } auto status_sent = control_socket_->Send(buffer.data(), buffer.size(), 0); if (status_sent < sizeof(vio_status) + size) { diff --git a/base/cvd/cuttlefish/host/libs/avb/BUILD.bazel b/base/cvd/cuttlefish/host/libs/avb/BUILD.bazel index 7cb1adda819..2bb15cd5dd6 100644 --- a/base/cvd/cuttlefish/host/libs/avb/BUILD.bazel +++ b/base/cvd/cuttlefish/host/libs/avb/BUILD.bazel @@ -8,7 +8,6 @@ cf_cc_library( name = "avb", srcs = ["avb.cpp"], hdrs = ["avb.h"], - include_cleaner_enabled = False, deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:files", @@ -22,7 +21,6 @@ cf_cc_library( name = "parser", srcs = ["parser.cc"], hdrs = ["parser.h"], - include_cleaner_enabled = False, deps = [ "//cuttlefish/io", "//cuttlefish/io:read_exact", diff --git a/base/cvd/cuttlefish/host/libs/avb/avb.cpp b/base/cvd/cuttlefish/host/libs/avb/avb.cpp index 22fc8e30596..ba7aa4ebfbd 100644 --- a/base/cvd/cuttlefish/host/libs/avb/avb.cpp +++ b/base/cvd/cuttlefish/host/libs/avb/avb.cpp @@ -18,9 +18,12 @@ #include "cuttlefish/host/libs/avb/avb.h" #include +#include +#include -#include #include +#include +#include #include "cuttlefish/common/libs/fs/shared_fd.h" #include "cuttlefish/common/libs/utils/files.h" diff --git a/base/cvd/cuttlefish/host/libs/avb/avb.h b/base/cvd/cuttlefish/host/libs/avb/avb.h index a2961177602..571f3430194 100644 --- a/base/cvd/cuttlefish/host/libs/avb/avb.h +++ b/base/cvd/cuttlefish/host/libs/avb/avb.h @@ -15,9 +15,9 @@ #pragma once +#include #include -#include #include #include diff --git a/base/cvd/cuttlefish/host/libs/avb/parser.cc b/base/cvd/cuttlefish/host/libs/avb/parser.cc index 27cef93e1a5..1547ee98e4f 100644 --- a/base/cvd/cuttlefish/host/libs/avb/parser.cc +++ b/base/cvd/cuttlefish/host/libs/avb/parser.cc @@ -15,8 +15,12 @@ #include "cuttlefish/host/libs/avb/parser.h" +#include + #include +#include #include +#include #include "libavb/libavb.h" diff --git a/base/cvd/cuttlefish/host/libs/command_util/BUILD.bazel b/base/cvd/cuttlefish/host/libs/command_util/BUILD.bazel index 3d8ef70ac22..0ff8722d265 100644 --- a/base/cvd/cuttlefish/host/libs/command_util/BUILD.bazel +++ b/base/cvd/cuttlefish/host/libs/command_util/BUILD.bazel @@ -28,7 +28,6 @@ cf_cc_library( "snapshot_utils.h", "util.h", ], - include_cleaner_enabled = False, deps = [ ":libcuttlefish_run_cvd_proto", "//cuttlefish/common/libs/fs", @@ -48,5 +47,6 @@ cf_cc_library( "//cuttlefish/result", "@abseil-cpp//absl/log", "@abseil-cpp//absl/strings", + "@jsoncpp", ], ) diff --git a/base/cvd/cuttlefish/host/libs/command_util/snapshot_utils.cc b/base/cvd/cuttlefish/host/libs/command_util/snapshot_utils.cc index de9f7f4c4e3..53aeb9ea22a 100644 --- a/base/cvd/cuttlefish/host/libs/command_util/snapshot_utils.cc +++ b/base/cvd/cuttlefish/host/libs/command_util/snapshot_utils.cc @@ -16,16 +16,20 @@ #include "cuttlefish/host/libs/command_util/snapshot_utils.h" -#include -#include +#include +#include +#include +#include -#include -#include +#include #include +#include #include +#include #include "absl/log/log.h" #include "absl/strings/strip.h" +#include "json/value.h" #include "cuttlefish/common/libs/fs/shared_fd.h" #include "cuttlefish/common/libs/utils/environment.h" @@ -35,6 +39,7 @@ #include "cuttlefish/files/directory_contents.h" #include "cuttlefish/files/directory_exists.h" #include "cuttlefish/files/file_exists.h" +#include "cuttlefish/host/libs/config/cuttlefish_config.h" #include "cuttlefish/posix/readlink.h" #include "cuttlefish/posix/realpath.h" #include "cuttlefish/posix/symlink.h" diff --git a/base/cvd/cuttlefish/host/libs/command_util/snapshot_utils.h b/base/cvd/cuttlefish/host/libs/command_util/snapshot_utils.h index 9b120eaa5f4..4274f4886eb 100644 --- a/base/cvd/cuttlefish/host/libs/command_util/snapshot_utils.h +++ b/base/cvd/cuttlefish/host/libs/command_util/snapshot_utils.h @@ -19,6 +19,8 @@ #include #include +#include "json/value.h" + #include "cuttlefish/host/libs/config/cuttlefish_config.h" #include "cuttlefish/result/result.h" diff --git a/base/cvd/cuttlefish/host/libs/command_util/util.cc b/base/cvd/cuttlefish/host/libs/command_util/util.cc index 097bab512b7..daa587e24cd 100644 --- a/base/cvd/cuttlefish/host/libs/command_util/util.cc +++ b/base/cvd/cuttlefish/host/libs/command_util/util.cc @@ -16,12 +16,14 @@ #include "cuttlefish/host/libs/command_util/util.h" +#include #include -#include +#include // IWYU pragma: keep: timeval #include #include #include +#include #include "cuttlefish/common/libs/fs/shared_buf.h" #include "cuttlefish/common/libs/fs/shared_fd.h" @@ -144,6 +146,7 @@ Result WaitForRead(SharedFD monitor_socket, const int timeout_seconds) { // Perform a select with a timeout to guard against launcher hanging SharedFDSet read_set; read_set.Set(monitor_socket); + // NOLINTNEXTLINE(misc-include-cleaner): struct timeval timeout = {timeout_seconds, 0}; int select_result = Select(&read_set, nullptr, nullptr, timeout_seconds <= 0 ? nullptr : &timeout); diff --git a/base/cvd/cuttlefish/host/libs/config/BUILD.bazel b/base/cvd/cuttlefish/host/libs/config/BUILD.bazel index c2004bb71b6..5fc67b61102 100644 --- a/base/cvd/cuttlefish/host/libs/config/BUILD.bazel +++ b/base/cvd/cuttlefish/host/libs/config/BUILD.bazel @@ -23,7 +23,6 @@ cf_cc_library( name = "config_flag", srcs = ["config_flag.cpp"], hdrs = ["config_flag.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/key_equals_value", "//cuttlefish/common/libs/utils:files", @@ -32,7 +31,6 @@ cf_cc_library( "//cuttlefish/files:directory_exists", "//cuttlefish/files:file_exists", "//cuttlefish/flag_parser", - "//cuttlefish/host/commands/assemble_cvd:flags_defaults", "//cuttlefish/host/commands/assemble_cvd/flags:system_image_dir", "//cuttlefish/host/libs/config:config_utils", "//cuttlefish/host/libs/config:cuttlefish_config", @@ -68,7 +66,6 @@ cf_cc_library( name = "config_utils", srcs = ["config_utils.cpp"], hdrs = ["config_utils.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/utils:contains", "//cuttlefish/common/libs/utils:environment", @@ -78,7 +75,6 @@ cf_cc_library( "//cuttlefish/files:file_exists", "//cuttlefish/host/libs/config:config_constants", "//cuttlefish/process:execute", - "//libbase", "@abseil-cpp//absl/log", "@abseil-cpp//absl/strings", ], @@ -117,7 +113,6 @@ cf_cc_library( "cuttlefish_config_instance.cpp", ], hdrs = ["cuttlefish_config.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/utils:device_type", "//cuttlefish/common/libs/utils:environment", @@ -140,14 +135,12 @@ cf_cc_library( "//cuttlefish/host/libs/config:vmm_mode", "//cuttlefish/host/libs/log_names", "//cuttlefish/result", - "//libbase", "@abseil-cpp//absl/log", "@abseil-cpp//absl/log:check", "@abseil-cpp//absl/strings", "@fmt", "@jsoncpp", "@protobuf", - "@protobuf//src/google/protobuf/io", ], ) @@ -155,7 +148,6 @@ cf_cc_library( name = "data_image", srcs = ["data_image.cpp"], hdrs = ["data_image.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:files", @@ -174,7 +166,6 @@ cf_cc_library( "//cuttlefish/process:execute", "//cuttlefish/process:managed_stdio", "//cuttlefish/result", - "//libbase", "@abseil-cpp//absl/log", ], ) @@ -193,14 +184,12 @@ cf_cc_library( name = "display", srcs = ["display.cpp"], hdrs = ["display.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/utils:contains", "//cuttlefish/flag_parser", "//cuttlefish/host/commands/assemble_cvd:flags_defaults", "//cuttlefish/host/libs/config:cuttlefish_config", "//cuttlefish/result", - "//libbase", "@abseil-cpp//absl/strings", ], ) @@ -209,14 +198,12 @@ cf_cc_library( name = "esp", srcs = ["esp.cpp"], hdrs = ["esp.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:host_info", "//cuttlefish/files:file_exists", "//cuttlefish/host/libs/config/esp:esp_builder", "//cuttlefish/process:execute", - "//libbase", "@abseil-cpp//absl/log", "@abseil-cpp//absl/strings", ], @@ -236,7 +223,6 @@ cf_cc_library( name = "build_archive", srcs = ["build_archive.cc"], hdrs = ["build_archive.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/utils:files", "//cuttlefish/files:file_exists", @@ -255,8 +241,6 @@ cf_cc_library( "//cuttlefish/result", "//libbase", "@abseil-cpp//absl/strings", - "@abseil-cpp//absl/strings:str_format", - "@fmt", ], ) @@ -346,12 +330,10 @@ cf_cc_library( name = "host_tools_version", srcs = ["host_tools_version.cpp"], hdrs = ["host_tools_version.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/files:directory_contents", "//cuttlefish/files:directory_exists", "//cuttlefish/host/libs/config:config_utils", - "//libbase", "@abseil-cpp//absl/log:check", "@zlib", ], @@ -361,13 +343,10 @@ cf_cc_library( name = "instance_nums", srcs = ["instance_nums.cpp"], hdrs = ["instance_nums.h"], - depend_on_what_you_use_enabled = False, deps = [ - "//cuttlefish/common/libs/utils:contains", "//cuttlefish/flag_parser", "//cuttlefish/host/libs/config:config_utils", "//cuttlefish/result", - "//libbase", "@abseil-cpp//absl/strings", "@gflags", ], @@ -409,13 +388,10 @@ cf_cc_library( name = "logging", srcs = ["logging.cpp"], hdrs = ["logging.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/utils:tee_logging", "//cuttlefish/host/libs/config:cuttlefish_config", - "//libbase", "@abseil-cpp//absl/log:check", - "@fmt", ], ) @@ -436,11 +412,9 @@ cf_cc_library( name = "openwrt_args", srcs = ["openwrt_args.cpp"], hdrs = ["openwrt_args.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/host/commands/cvdalloc:interface", "//cuttlefish/host/libs/config:cuttlefish_config", - "//libbase", "@abseil-cpp//absl/strings", ], ) @@ -449,10 +423,8 @@ cf_cc_library( name = "secure_hals", srcs = ["secure_hals.cpp"], hdrs = ["secure_hals.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/result", - "//libbase", "@abseil-cpp//absl/base:no_destructor", "@abseil-cpp//absl/strings", ], @@ -462,13 +434,11 @@ cf_cc_library( name = "touchpad", srcs = ["touchpad.cpp"], hdrs = ["touchpad.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/utils:contains", "//cuttlefish/flag_parser", "//cuttlefish/host/libs/config:cuttlefish_config", "//cuttlefish/result", - "//libbase", "@abseil-cpp//absl/strings", ], ) @@ -487,13 +457,10 @@ cf_cc_library( name = "media", srcs = ["media.cpp"], hdrs = ["media.h"], - depend_on_what_you_use_enabled = False, deps = [ - "//cuttlefish/common/libs/utils:contains", "//cuttlefish/flag_parser", "//cuttlefish/host/libs/config:cuttlefish_config", "//cuttlefish/result", - "//libbase", "@abseil-cpp//absl/strings", ], ) diff --git a/base/cvd/cuttlefish/host/libs/config/adb/BUILD.bazel b/base/cvd/cuttlefish/host/libs/config/adb/BUILD.bazel index bdee0ef8658..c3a6c47a145 100644 --- a/base/cvd/cuttlefish/host/libs/config/adb/BUILD.bazel +++ b/base/cvd/cuttlefish/host/libs/config/adb/BUILD.bazel @@ -14,7 +14,6 @@ cf_cc_library( "strings.cpp", ], hdrs = ["adb.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/utils:container", "//cuttlefish/flag_parser", @@ -26,11 +25,9 @@ cf_cc_library( "//cuttlefish/host/libs/feature", "//cuttlefish/process:command", "//cuttlefish/result", - "//libbase", "@abseil-cpp//absl/log", "@abseil-cpp//absl/strings", "@fruit", - "@gflags", "@jsoncpp", ], ) diff --git a/base/cvd/cuttlefish/host/libs/config/fastboot/BUILD.bazel b/base/cvd/cuttlefish/host/libs/config/fastboot/BUILD.bazel index 63d6b35c4a3..34d9e857c69 100644 --- a/base/cvd/cuttlefish/host/libs/config/fastboot/BUILD.bazel +++ b/base/cvd/cuttlefish/host/libs/config/fastboot/BUILD.bazel @@ -13,7 +13,6 @@ cf_cc_library( "launch.cpp", ], hdrs = ["fastboot.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/flag_parser", "//cuttlefish/host/commands/kernel_log_monitor:kernel_log_monitor_utils", @@ -25,10 +24,8 @@ cf_cc_library( "//cuttlefish/host/libs/feature", "//cuttlefish/process:command", "//cuttlefish/result", - "//libbase", "@abseil-cpp//absl/log", "@fruit", - "@gflags", "@jsoncpp", ], )