From 017650740904c9a80a54e7ec0eab8f25f5294ce7 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Mon, 9 Sep 2024 09:19:33 +1200 Subject: [PATCH] Fix includes and warnings with GCC14 and clang18 --- examples/logfile_download/logfile_download.cpp | 3 ++- src/mavsdk/core/call_every_handler.cpp | 1 + src/mavsdk/core/callback_list_impl.h | 1 + src/mavsdk/core/mavlink_request_message_handler.cpp | 1 + src/mavsdk/core/timeout_handler.cpp | 1 + src/mavsdk/plugins/telemetry_server/telemetry_server_impl.cpp | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/logfile_download/logfile_download.cpp b/examples/logfile_download/logfile_download.cpp index 90b4adc689..f093f11139 100644 --- a/examples/logfile_download/logfile_download.cpp +++ b/examples/logfile_download/logfile_download.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -42,7 +43,7 @@ int main(int argc, char** argv) bool remove_log_files = false; for (int i = 2; i < argc; ++i) { - if (argv[i] == "--rm") { + if (std::string(argv[i]) == "--rm") { remove_log_files = true; } } diff --git a/src/mavsdk/core/call_every_handler.cpp b/src/mavsdk/core/call_every_handler.cpp index fce675d747..c92756876e 100644 --- a/src/mavsdk/core/call_every_handler.cpp +++ b/src/mavsdk/core/call_every_handler.cpp @@ -1,5 +1,6 @@ #include "call_every_handler.h" +#include #include namespace mavsdk { diff --git a/src/mavsdk/core/callback_list_impl.h b/src/mavsdk/core/callback_list_impl.h index 1bfe04ba45..ba66e78c7c 100644 --- a/src/mavsdk/core/callback_list_impl.h +++ b/src/mavsdk/core/callback_list_impl.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include diff --git a/src/mavsdk/core/mavlink_request_message_handler.cpp b/src/mavsdk/core/mavlink_request_message_handler.cpp index 89a976a1ff..a9382e189b 100644 --- a/src/mavsdk/core/mavlink_request_message_handler.cpp +++ b/src/mavsdk/core/mavlink_request_message_handler.cpp @@ -3,6 +3,7 @@ #include "server_component_impl.h" #include "mavlink_command_receiver.h" #include "log.h" +#include namespace mavsdk { diff --git a/src/mavsdk/core/timeout_handler.cpp b/src/mavsdk/core/timeout_handler.cpp index 17870d6807..b421501d28 100644 --- a/src/mavsdk/core/timeout_handler.cpp +++ b/src/mavsdk/core/timeout_handler.cpp @@ -1,3 +1,4 @@ +#include #include "timeout_handler.h" namespace mavsdk { diff --git a/src/mavsdk/plugins/telemetry_server/telemetry_server_impl.cpp b/src/mavsdk/plugins/telemetry_server/telemetry_server_impl.cpp index 132c2467d4..a11fd8acfa 100644 --- a/src/mavsdk/plugins/telemetry_server/telemetry_server_impl.cpp +++ b/src/mavsdk/plugins/telemetry_server/telemetry_server_impl.cpp @@ -1,5 +1,6 @@ #include "telemetry_server_impl.h" #include "unused.h" +#include #include namespace mavsdk {