Skip to content

Commit

Permalink
src/core: remove unnecessary includes
Browse files Browse the repository at this point in the history
these unused includes are identified by clangd. see
https://clangd.llvm.org/guides/include-cleaner#unused-include-warning
for more details on the "Unused include" warning.

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Jul 10, 2024
1 parent 52f1ec2 commit 10a6fe3
Show file tree
Hide file tree
Showing 16 changed files with 4 additions and 25 deletions.
1 change: 0 additions & 1 deletion include/seastar/core/future.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

#ifndef SEASTAR_MODULE
#include <cassert>
#include <concepts>
#include <cstdlib>
#include <cstring>
#include <functional>
Expand Down
5 changes: 0 additions & 5 deletions src/core/fair_queue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,10 @@ module;

#include <chrono>
#include <functional>
#include <queue>
#include <unordered_set>
#include <utility>
#include <boost/container/small_vector.hpp>
#include <boost/intrusive/parent_from_member.hpp>

#include "fmt/format.h"
#include "fmt/ostream.h"

#ifdef SEASTAR_MODULE
module seastar;
#else
Expand Down
1 change: 0 additions & 1 deletion src/core/file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ module;
#include <atomic>
#include <coroutine>
#include <deque>
#include <filesystem>
#include <functional>
#include <memory>
#include <optional>
Expand Down
3 changes: 0 additions & 3 deletions src/core/io_queue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
module;
#endif

#include <compare>
#include <atomic>
#include <cassert>
#include <array>
#include <chrono>
#include <cstdint>
#include <mutex>
Expand Down
1 change: 0 additions & 1 deletion src/core/linux-aio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
module;
#endif

#include <compare>
#include <atomic>
#include <algorithm>
#include <cerrno>
Expand Down
3 changes: 1 addition & 2 deletions src/core/memory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,11 @@ module;
#endif

#include <cassert>
#include <concepts>
#include <unordered_set>
#include <iostream>
#include <optional>
#include <thread>
#include <memory_resource>
#include <thread>

#include <fmt/format.h>
#include <fmt/ostream.h>
Expand Down
1 change: 0 additions & 1 deletion src/core/on_internal_error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
module;
#endif

#include <compare>
#include <atomic>
#include <exception>
#include <stdexcept>
Expand Down
1 change: 0 additions & 1 deletion src/core/prefault.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#pragma once

#include <atomic>
#include <map>
#include <optional>

#include <seastar/core/posix.hh>
Expand Down
2 changes: 0 additions & 2 deletions src/core/reactor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
module;
#endif

#include <compare>
#include <atomic>
#include <cassert>
#include <chrono>
Expand All @@ -34,7 +33,6 @@ module;
#include <regex>
#include <thread>

#include <cinttypes>
#include <spawn.h>
#include <sys/syscall.h>
#include <sys/vfs.h>
Expand Down
1 change: 0 additions & 1 deletion src/core/reactor_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
module;
#endif

#include <compare>
#include <atomic>
#include <cassert>
#include <chrono>
Expand Down
1 change: 0 additions & 1 deletion src/core/reactor_backend.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#ifndef SEASTAR_MODULE
#include <fmt/ostream.h>
#include <sys/time.h>
#include <signal.h>
#include <thread>
#include <stack>
#include <boost/any.hpp>
Expand Down
1 change: 0 additions & 1 deletion src/core/scollectd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ module;
#include <cstdint>
#include <functional>
#include <unordered_map>
#include <forward_list>
#include <utility>
#include <string>
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion src/core/smp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module;
#endif

#include <boost/range/algorithm/find_if.hpp>
#include <memory>
#include <atomic>
#include <vector>
#include <regex>
#include <sys/mman.h>
Expand Down
1 change: 0 additions & 1 deletion src/core/systemwide_memory_barrier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ module;
#include <unistd.h>
#include <cassert>
#include <atomic>
#include <mutex>

#if SEASTAR_HAS_MEMBARRIER
#include <linux/membarrier.h>
Expand Down
3 changes: 2 additions & 1 deletion src/core/thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ module;
#endif

#include <ucontext.h>
#ifndef SEASTAR_ASAN_ENABLED
#include <setjmp.h>
#endif
#include <stdint.h>
#include <valgrind/valgrind.h>
#include <algorithm>
#include <exception>
#include <utility>
#include <boost/intrusive/list.hpp>
Expand Down
2 changes: 0 additions & 2 deletions src/core/vla.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@

#include <seastar/core/aligned_buffer.hh>
#include <memory>
#include <new>
#include <assert.h>
#include <type_traits>

namespace seastar {

Expand Down

0 comments on commit 10a6fe3

Please sign in to comment.