diff options
author | Ed Tanous <edtanous@google.com> | 2023-01-14 04:40:03 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-01-18 20:06:25 +0300 |
commit | 3ccb3adb9a14783f6bef601506de9f8bcae22d51 (patch) | |
tree | f77a62b7f6e8ba8671c99578335214b6dd8348ac /include | |
parent | 3a4ad5d9dba5ebbb92e8663c3177a326e920cd71 (diff) | |
download | bmcweb-3ccb3adb9a14783f6bef601506de9f8bcae22d51.tar.xz |
Fix a boatload of #includes
Most of these missing includes were found by running clang-tidy on all
files, including headers. The existing scripts just run clang-tidy on
source files, which doesn't catch most of these.
Tested: Code compiles
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ic741fbb2cc9e5e92955fd5a1b778a482830e80e8
Diffstat (limited to 'include')
-rw-r--r-- | include/async_resolve.hpp | 3 | ||||
-rw-r--r-- | include/authentication.hpp | 14 | ||||
-rw-r--r-- | include/cors_preflight.hpp | 6 | ||||
-rw-r--r-- | include/dbus_monitor.hpp | 9 | ||||
-rw-r--r-- | include/forward_unauthorized.hpp | 6 | ||||
-rw-r--r-- | include/google/google_service_root.hpp | 15 | ||||
-rw-r--r-- | include/hostname_monitor.hpp | 10 | ||||
-rw-r--r-- | include/ibm/locks.hpp | 2 | ||||
-rw-r--r-- | include/ibm/management_console_rest.hpp | 15 | ||||
-rw-r--r-- | include/ibm/utils.hpp | 2 | ||||
-rw-r--r-- | include/image_upload.hpp | 8 | ||||
-rw-r--r-- | include/kvm_websocket.hpp | 5 | ||||
-rw-r--r-- | include/login_routes.hpp | 12 | ||||
-rw-r--r-- | include/multipart_parser.hpp | 3 | ||||
-rw-r--r-- | include/nbd_proxy.hpp | 7 | ||||
-rw-r--r-- | include/obmc_console.hpp | 5 | ||||
-rw-r--r-- | include/openbmc_dbus_rest.hpp | 7 | ||||
-rw-r--r-- | include/persistent_data.hpp | 11 | ||||
-rw-r--r-- | include/random.hpp | 3 | ||||
-rw-r--r-- | include/security_headers.hpp | 5 | ||||
-rw-r--r-- | include/sessions.hpp | 4 | ||||
-rw-r--r-- | include/ssl_key_handler.hpp | 6 | ||||
-rw-r--r-- | include/vm_websocket.hpp | 3 | ||||
-rw-r--r-- | include/webassets.hpp | 8 |
24 files changed, 96 insertions, 73 deletions
diff --git a/include/async_resolve.hpp b/include/async_resolve.hpp index 578d9a9949..0027a054f9 100644 --- a/include/async_resolve.hpp +++ b/include/async_resolve.hpp @@ -1,4 +1,7 @@ #pragma once +#include "dbus_singleton.hpp" +#include "logging.hpp" + #include <boost/asio/ip/address.hpp> #include <boost/asio/ip/basic_endpoint.hpp> #include <boost/asio/ip/tcp.hpp> diff --git a/include/authentication.hpp b/include/authentication.hpp index 84875a9a1d..93e9c8db79 100644 --- a/include/authentication.hpp +++ b/include/authentication.hpp @@ -1,15 +1,15 @@ #pragma once +#include "app.hpp" +#include "common.hpp" +#include "forward_unauthorized.hpp" +#include "http_request.hpp" +#include "http_response.hpp" +#include "http_utility.hpp" +#include "pam_authenticate.hpp" #include "webroutes.hpp" -#include <app.hpp> #include <boost/container/flat_set.hpp> -#include <common.hpp> -#include <forward_unauthorized.hpp> -#include <http_request.hpp> -#include <http_response.hpp> -#include <http_utility.hpp> -#include <pam_authenticate.hpp> #include <random> #include <utility> diff --git a/include/cors_preflight.hpp b/include/cors_preflight.hpp index ae883255a3..43e90738de 100644 --- a/include/cors_preflight.hpp +++ b/include/cors_preflight.hpp @@ -1,8 +1,8 @@ #pragma once -#include <app.hpp> -#include <http_request.hpp> -#include <http_response.hpp> +#include "app.hpp" +#include "http_request.hpp" +#include "http_response.hpp" namespace cors_preflight { diff --git a/include/dbus_monitor.hpp b/include/dbus_monitor.hpp index 3bad07002d..094f183e98 100644 --- a/include/dbus_monitor.hpp +++ b/include/dbus_monitor.hpp @@ -1,10 +1,11 @@ #pragma once -#include <app.hpp> -#include <async_resp.hpp> +#include "app.hpp" +#include "async_resp.hpp" +#include "dbus_singleton.hpp" +#include "openbmc_dbus_rest.hpp" + #include <boost/container/flat_map.hpp> #include <boost/container/flat_set.hpp> -#include <dbus_singleton.hpp> -#include <openbmc_dbus_rest.hpp> #include <sdbusplus/bus/match.hpp> #include <sdbusplus/message/types.hpp> #include <websocket.hpp> diff --git a/include/forward_unauthorized.hpp b/include/forward_unauthorized.hpp index 850a0b79b0..4ec770f598 100644 --- a/include/forward_unauthorized.hpp +++ b/include/forward_unauthorized.hpp @@ -1,7 +1,7 @@ #pragma once -#include <http_request.hpp> -#include <http_response.hpp> -#include <http_utility.hpp> +#include "http_request.hpp" +#include "http_response.hpp" +#include "http_utility.hpp" namespace forward_unauthorized { diff --git a/include/google/google_service_root.hpp b/include/google/google_service_root.hpp index f14cffe20b..7d48845714 100644 --- a/include/google/google_service_root.hpp +++ b/include/google/google_service_root.hpp @@ -1,13 +1,14 @@ #pragma once -#include <app.hpp> -#include <async_resp.hpp> -#include <dbus_utility.hpp> -#include <error_messages.hpp> +#include "app.hpp" +#include "async_resp.hpp" +#include "dbus_utility.hpp" +#include "error_messages.hpp" +#include "utils/collection.hpp" +#include "utils/hex_utils.hpp" +#include "utils/json_utils.hpp" + #include <nlohmann/json.hpp> -#include <utils/collection.hpp> -#include <utils/hex_utils.hpp> -#include <utils/json_utils.hpp> #include <array> #include <string_view> diff --git a/include/hostname_monitor.hpp b/include/hostname_monitor.hpp index cb84ad67d0..f0d8bdf322 100644 --- a/include/hostname_monitor.hpp +++ b/include/hostname_monitor.hpp @@ -1,11 +1,13 @@ #pragma once #ifdef BMCWEB_ENABLE_SSL -#include <dbus_singleton.hpp> -#include <dbus_utility.hpp> -#include <include/dbus_utility.hpp> +#include "dbus_singleton.hpp" +#include "dbus_utility.hpp" +#include "include/dbus_utility.hpp" +#include "logging.hpp" +#include "ssl_key_handler.hpp" + #include <sdbusplus/bus/match.hpp> #include <sdbusplus/message/types.hpp> -#include <ssl_key_handler.hpp> namespace crow { diff --git a/include/ibm/locks.hpp b/include/ibm/locks.hpp index e3abb46e92..fd27ef91cb 100644 --- a/include/ibm/locks.hpp +++ b/include/ibm/locks.hpp @@ -1,11 +1,11 @@ #pragma once #include "ibm/utils.hpp" +#include "logging.hpp" #include <boost/algorithm/string/predicate.hpp> #include <boost/container/flat_map.hpp> #include <boost/endian/conversion.hpp> -#include <logging.hpp> #include <nlohmann/json.hpp> #include <filesystem> diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp index 34befd7fb1..6e4e7bbbfc 100644 --- a/include/ibm/management_console_rest.hpp +++ b/include/ibm/management_console_rest.hpp @@ -1,16 +1,17 @@ #pragma once -#include <app.hpp> -#include <async_resp.hpp> +#include "app.hpp" +#include "async_resp.hpp" +#include "error_messages.hpp" +#include "event_service_manager.hpp" +#include "ibm/locks.hpp" +#include "resource_messages.hpp" +#include "utils/json_utils.hpp" + #include <boost/algorithm/string/predicate.hpp> #include <boost/container/flat_set.hpp> -#include <error_messages.hpp> -#include <event_service_manager.hpp> -#include <ibm/locks.hpp> #include <nlohmann/json.hpp> -#include <resource_messages.hpp> #include <sdbusplus/message/types.hpp> -#include <utils/json_utils.hpp> #include <filesystem> #include <fstream> diff --git a/include/ibm/utils.hpp b/include/ibm/utils.hpp index 217b2f4d1a..256cbc52b5 100644 --- a/include/ibm/utils.hpp +++ b/include/ibm/utils.hpp @@ -1,6 +1,6 @@ #pragma once -#include <logging.hpp> +#include "logging.hpp" #include <filesystem> #include <fstream> diff --git a/include/image_upload.hpp b/include/image_upload.hpp index bdb7b951ac..ab2901ee2b 100644 --- a/include/image_upload.hpp +++ b/include/image_upload.hpp @@ -1,11 +1,13 @@ #pragma once -#include <app.hpp> +#include "app.hpp" +#include "dbus_singleton.hpp" +#include "dbus_utility.hpp" + #include <boost/uuid/uuid.hpp> #include <boost/uuid/uuid_generators.hpp> #include <boost/uuid/uuid_io.hpp> -#include <dbus_singleton.hpp> -#include <dbus_utility.hpp> +#include <sdbusplus/bus/match.hpp> #include <cstdio> #include <fstream> diff --git a/include/kvm_websocket.hpp b/include/kvm_websocket.hpp index 1a067ac0fc..942e9c607e 100644 --- a/include/kvm_websocket.hpp +++ b/include/kvm_websocket.hpp @@ -1,8 +1,9 @@ #pragma once +#include "app.hpp" +#include "async_resp.hpp" + #include <sys/socket.h> -#include <app.hpp> -#include <async_resp.hpp> #include <boost/container/flat_map.hpp> #include <websocket.hpp> diff --git a/include/login_routes.hpp b/include/login_routes.hpp index df910e4485..e3b8c195d2 100644 --- a/include/login_routes.hpp +++ b/include/login_routes.hpp @@ -1,14 +1,14 @@ #pragma once +#include "app.hpp" +#include "common.hpp" +#include "http_request.hpp" +#include "http_response.hpp" #include "multipart_parser.hpp" +#include "pam_authenticate.hpp" +#include "webassets.hpp" -#include <app.hpp> #include <boost/container/flat_set.hpp> -#include <common.hpp> -#include <http_request.hpp> -#include <http_response.hpp> -#include <pam_authenticate.hpp> -#include <webassets.hpp> #include <random> diff --git a/include/multipart_parser.hpp b/include/multipart_parser.hpp index a2f63bd167..482426997d 100644 --- a/include/multipart_parser.hpp +++ b/include/multipart_parser.hpp @@ -1,7 +1,8 @@ #pragma once +#include "http_request.hpp" + #include <boost/beast/http/fields.hpp> -#include <http_request.hpp> #include <string> #include <string_view> diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp index 68491cb86b..3472c3a514 100644 --- a/include/nbd_proxy.hpp +++ b/include/nbd_proxy.hpp @@ -14,15 +14,16 @@ // limitations under the License. */ #pragma once -#include <app.hpp> +#include "app.hpp" +#include "dbus_utility.hpp" +#include "privileges.hpp" + #include <boost/asio/buffer.hpp> #include <boost/asio/local/stream_protocol.hpp> #include <boost/asio/write.hpp> #include <boost/beast/core/buffers_to_string.hpp> #include <boost/beast/core/multi_buffer.hpp> #include <boost/container/flat_map.hpp> -#include <dbus_utility.hpp> -#include <privileges.hpp> #include <websocket.hpp> namespace crow diff --git a/include/obmc_console.hpp b/include/obmc_console.hpp index b8f69435fc..3ab13ee4c2 100644 --- a/include/obmc_console.hpp +++ b/include/obmc_console.hpp @@ -1,8 +1,9 @@ #pragma once +#include "app.hpp" +#include "async_resp.hpp" + #include <sys/socket.h> -#include <app.hpp> -#include <async_resp.hpp> #include <boost/asio/local/stream_protocol.hpp> #include <boost/container/flat_set.hpp> #include <websocket.hpp> diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp index c7dbb27c4e..61eaa6e8c7 100644 --- a/include/openbmc_dbus_rest.hpp +++ b/include/openbmc_dbus_rest.hpp @@ -13,6 +13,9 @@ // limitations under the License. #pragma once +#include "app.hpp" +#include "async_resp.hpp" +#include "dbus_singleton.hpp" #include "dbus_utility.hpp" #include "http_request.hpp" #include "http_response.hpp" @@ -23,8 +26,6 @@ #include <systemd/sd-bus.h> #include <tinyxml2.h> -#include <app.hpp> -#include <async_resp.hpp> #include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/split.hpp> @@ -33,8 +34,6 @@ #include <boost/container/flat_map.hpp> #include <boost/container/vector.hpp> #include <boost/iterator/iterator_facade.hpp> -#include <dbus_singleton.hpp> -#include <dbus_utility.hpp> #include <nlohmann/json.hpp> #include <sdbusplus/asio/connection.hpp> #include <sdbusplus/asio/property.hpp> diff --git a/include/persistent_data.hpp b/include/persistent_data.hpp index 7478713161..03efb0a198 100644 --- a/include/persistent_data.hpp +++ b/include/persistent_data.hpp @@ -1,15 +1,16 @@ #pragma once -#include <app.hpp> +#include "app.hpp" +#include "event_service_store.hpp" +#include "http_request.hpp" +#include "http_response.hpp" +#include "sessions.hpp" + #include <boost/beast/http/fields.hpp> #include <boost/uuid/uuid.hpp> #include <boost/uuid/uuid_generators.hpp> #include <boost/uuid/uuid_io.hpp> -#include <event_service_store.hpp> -#include <http_request.hpp> -#include <http_response.hpp> #include <nlohmann/json.hpp> -#include <sessions.hpp> #include <filesystem> #include <fstream> diff --git a/include/random.hpp b/include/random.hpp index 082c4e3008..f5f094689e 100644 --- a/include/random.hpp +++ b/include/random.hpp @@ -2,6 +2,9 @@ #include <openssl/rand.h> +#include <iostream> +#include <limits> + namespace bmcweb { diff --git a/include/security_headers.hpp b/include/security_headers.hpp index 19075fbd73..d724de4e8a 100644 --- a/include/security_headers.hpp +++ b/include/security_headers.hpp @@ -1,8 +1,9 @@ #pragma once -#include <bmcweb_config.h> +#include "bmcweb_config.h" -#include <http_response.hpp> +#include "http_request.hpp" +#include "http_response.hpp" inline void addSecurityHeaders(const crow::Request& req [[maybe_unused]], crow::Response& res) diff --git a/include/sessions.hpp b/include/sessions.hpp index 94a0755e7f..19a1793ff9 100644 --- a/include/sessions.hpp +++ b/include/sessions.hpp @@ -3,15 +3,15 @@ #include "logging.hpp" #include "random.hpp" #include "utility.hpp" +#include "utils/ip_utils.hpp" #include <nlohmann/json.hpp> -#include <utils/ip_utils.hpp> #include <csignal> #include <optional> #include <random> #ifdef BMCWEB_ENABLE_IBM_MANAGEMENT_CONSOLE -#include <ibm/locks.hpp> +#include "ibm/locks.hpp" #endif namespace persistent_data diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp index c6ceb83c2a..73d0b83590 100644 --- a/include/ssl_key_handler.hpp +++ b/include/ssl_key_handler.hpp @@ -1,5 +1,8 @@ #pragma once +#include "logging.hpp" +#include "random.hpp" + #include <openssl/bio.h> #include <openssl/dh.h> #include <openssl/dsa.h> @@ -11,9 +14,10 @@ #include <openssl/ssl.h> #include <boost/asio/ssl/context.hpp> -#include <random.hpp> +#include <optional> #include <random> +#include <string> namespace ensuressl { diff --git a/include/vm_websocket.hpp b/include/vm_websocket.hpp index 1d3bf96c4c..188bcf2ad3 100644 --- a/include/vm_websocket.hpp +++ b/include/vm_websocket.hpp @@ -1,6 +1,7 @@ #pragma once -#include <app.hpp> +#include "app.hpp" + #include <boost/beast/core/flat_static_buffer.hpp> #include <boost/process/async_pipe.hpp> #include <boost/process/child.hpp> diff --git a/include/webassets.hpp b/include/webassets.hpp index cd57eb30c8..ca4137448f 100644 --- a/include/webassets.hpp +++ b/include/webassets.hpp @@ -1,13 +1,13 @@ #pragma once +#include "app.hpp" +#include "http_request.hpp" +#include "http_response.hpp" +#include "routing.hpp" #include "webroutes.hpp" -#include <app.hpp> #include <boost/algorithm/string/replace.hpp> #include <boost/container/flat_set.hpp> -#include <http_request.hpp> -#include <http_response.hpp> -#include <routing.hpp> #include <filesystem> #include <fstream> |