build: clear 12 platform-gated warnings the x64 census could not see (#15633)

This commit is contained in:
Kris Austin
2026-09-11 21:24:37 -03:00
committed by GitHub
parent 74cf148384
commit 75f5fe22e8
6 changed files with 19 additions and 9 deletions
+6 -6
View File
@@ -4981,7 +4981,7 @@ static void apply_mixed_config_relocations(DynamicPrintConfig&
case coBools: { case coBools: {
auto* live = static_cast<ConfigOptionBools*>(opt); auto* live = static_cast<ConfigOptionBools*>(opt);
const auto* frozen = static_cast<const ConfigOptionBools*>(snapshot.get()); const auto* frozen = static_cast<const ConfigOptionBools*>(snapshot.get());
for (const auto [from, to] : moves) { for (const auto& [from, to] : moves) {
const unsigned char cell = from < frozen->values.size() ? frozen->values[from] : 0; const unsigned char cell = from < frozen->values.size() ? frozen->values[from] : 0;
if (live->values.size() <= to) if (live->values.size() <= to)
live->values.resize(to + 1, 0); live->values.resize(to + 1, 0);
@@ -4992,7 +4992,7 @@ static void apply_mixed_config_relocations(DynamicPrintConfig&
case coStrings: { case coStrings: {
auto* live = static_cast<ConfigOptionStrings*>(opt); auto* live = static_cast<ConfigOptionStrings*>(opt);
const auto* frozen = static_cast<const ConfigOptionStrings*>(snapshot.get()); const auto* frozen = static_cast<const ConfigOptionStrings*>(snapshot.get());
for (const auto [from, to] : moves) { for (const auto& [from, to] : moves) {
const std::string cell = from < frozen->values.size() ? frozen->values[from] : std::string(); const std::string cell = from < frozen->values.size() ? frozen->values[from] : std::string();
if (live->values.size() <= to) if (live->values.size() <= to)
live->values.resize(to + 1, std::string{}); live->values.resize(to + 1, std::string{});
@@ -5028,7 +5028,7 @@ static void apply_receiver_mix_relocations(DynamicPrintConfig&
auto* live = static_cast<ConfigOptionBools*>(opt); auto* live = static_cast<ConfigOptionBools*>(opt);
std::unique_ptr<ConfigOption> snapshot(opt->clone()); std::unique_ptr<ConfigOption> snapshot(opt->clone());
const auto* frozen = static_cast<const ConfigOptionBools*>(snapshot.get()); const auto* frozen = static_cast<const ConfigOptionBools*>(snapshot.get());
for (const auto [from, to] : moves) { for (const auto& [from, to] : moves) {
const bool cell = from < frozen->values.size() ? frozen->values[from] : false; const bool cell = from < frozen->values.size() ? frozen->values[from] : false;
if (live->values.size() <= to) if (live->values.size() <= to)
live->values.resize(to + 1, false); live->values.resize(to + 1, false);
@@ -5044,7 +5044,7 @@ static void apply_receiver_mix_relocations(DynamicPrintConfig&
auto* live = static_cast<ConfigOptionStrings*>(opt); auto* live = static_cast<ConfigOptionStrings*>(opt);
std::unique_ptr<ConfigOption> snapshot(opt->clone()); std::unique_ptr<ConfigOption> snapshot(opt->clone());
const auto* frozen = static_cast<const ConfigOptionStrings*>(snapshot.get()); const auto* frozen = static_cast<const ConfigOptionStrings*>(snapshot.get());
for (const auto [from, to] : moves) { for (const auto& [from, to] : moves) {
const std::string cell = from < frozen->values.size() ? frozen->values[from] : std::string(); const std::string cell = from < frozen->values.size() ? frozen->values[from] : std::string();
if (live->values.size() <= to) if (live->values.size() <= to)
live->values.resize(to + 1, std::string{}); live->values.resize(to + 1, std::string{});
@@ -5060,7 +5060,7 @@ static void apply_receiver_mix_relocations(DynamicPrintConfig&
auto* live = static_cast<ConfigOptionInts*>(opt); auto* live = static_cast<ConfigOptionInts*>(opt);
std::unique_ptr<ConfigOption> snapshot(opt->clone()); std::unique_ptr<ConfigOption> snapshot(opt->clone());
const auto* frozen = static_cast<const ConfigOptionInts*>(snapshot.get()); const auto* frozen = static_cast<const ConfigOptionInts*>(snapshot.get());
for (const auto [from, to] : moves) { for (const auto& [from, to] : moves) {
const int cell = from < frozen->values.size() ? frozen->values[from] : 0; const int cell = from < frozen->values.size() ? frozen->values[from] : 0;
if (live->values.size() <= to) if (live->values.size() <= to)
live->values.resize(to + 1, 0); live->values.resize(to + 1, 0);
@@ -5087,7 +5087,7 @@ static void apply_receiver_mix_relocations(DynamicPrintConfig&
move_ints("filament_volume_map"); move_ints("filament_volume_map");
{ {
const std::vector<std::vector<std::string>> frozen = ams_multi_color_filment; const std::vector<std::vector<std::string>> frozen = ams_multi_color_filment;
for (const auto [from, to] : moves) { for (const auto& [from, to] : moves) {
const std::vector<std::string> cell = from < frozen.size() ? frozen[from] : std::vector<std::string>(); const std::vector<std::string> cell = from < frozen.size() ? frozen[from] : std::vector<std::string>();
if (ams_multi_color_filment.size() <= to) if (ams_multi_color_filment.size() <= to)
ams_multi_color_filment.resize(to + 1, std::vector<std::string>{}); ams_multi_color_filment.resize(to + 1, std::vector<std::string>{});
+7 -2
View File
@@ -30,6 +30,11 @@ static HMODULE s_hKernel32 = nullptr;
static SetThreadDescriptionType s_fnSetThreadDescription = nullptr; static SetThreadDescriptionType s_fnSetThreadDescription = nullptr;
static GetThreadDescriptionType s_fnGetThreadDescription = nullptr; static GetThreadDescriptionType s_fnGetThreadDescription = nullptr;
// Convert the FARPROC from GetProcAddress to Fn through a generic function pointer.
template<typename Fn> static Fn load_proc(HMODULE module, const char* name) {
return reinterpret_cast<Fn>(reinterpret_cast<void(*)()>(::GetProcAddress(module, name)));
}
static bool WindowsGetSetThreadNameAPIInitialize() static bool WindowsGetSetThreadNameAPIInitialize()
{ {
if (! s_SetGetThreadDescriptionInitialized) { if (! s_SetGetThreadDescriptionInitialized) {
@@ -37,8 +42,8 @@ static bool WindowsGetSetThreadNameAPIInitialize()
// to initialize // to initialize
s_hKernel32 = LoadLibraryW(L"Kernel32.dll"); s_hKernel32 = LoadLibraryW(L"Kernel32.dll");
if (s_hKernel32) { if (s_hKernel32) {
s_fnSetThreadDescription = (SetThreadDescriptionType)::GetProcAddress(s_hKernel32, "SetThreadDescription"); s_fnSetThreadDescription = load_proc<SetThreadDescriptionType>(s_hKernel32, "SetThreadDescription");
s_fnGetThreadDescription = (GetThreadDescriptionType)::GetProcAddress(s_hKernel32, "GetThreadDescription"); s_fnGetThreadDescription = load_proc<GetThreadDescriptionType>(s_hKernel32, "GetThreadDescription");
} }
s_SetGetThreadDescriptionInitialized = true; s_SetGetThreadDescriptionInitialized = true;
} }
-1
View File
@@ -87,7 +87,6 @@ private:
std::condition_variable m_thread_stop_condition; std::condition_variable m_thread_stop_condition;
mutable std::mutex m_thread_stop_mutex; mutable std::mutex m_thread_stop_mutex;
bool m_stop{ false }; bool m_stop{ false };
bool m_start{ true };
// background thread method // background thread method
void listen(); void listen();
+2
View File
@@ -183,7 +183,9 @@ private:
HyperLink* m_hyperlink{nullptr}; // ORCA HyperLink* m_hyperlink{nullptr}; // ORCA
wxBoxSizer * m_sizer_my_devices{nullptr}; wxBoxSizer * m_sizer_my_devices{nullptr};
wxBoxSizer * m_sizer_other_devices{nullptr}; wxBoxSizer * m_sizer_other_devices{nullptr};
#if defined(__WINDOWS__)
wxBoxSizer * m_sizer_search_bar{nullptr}; wxBoxSizer * m_sizer_search_bar{nullptr};
#endif
wxSearchCtrl* m_search_bar{nullptr}; wxSearchCtrl* m_search_bar{nullptr};
wxScrolledWindow * m_scrolledWindow{nullptr}; wxScrolledWindow * m_scrolledWindow{nullptr};
wxTimer * m_refresh_timer{nullptr}; wxTimer * m_refresh_timer{nullptr};
+2
View File
@@ -134,7 +134,9 @@ public:
} }
private: private:
#if defined(__WXMSW__) || defined(__APPLE__)
int m_suspended_count = 0; int m_suspended_count = 0;
#endif
}; };
static bool needs_filament_swatch_border(const wxColour& colour) static bool needs_filament_swatch_border(const wxColour& colour)
+2
View File
@@ -331,7 +331,9 @@ void Serial::set_baud_rate(unsigned baud_rate)
speed_t c_ispeed; speed_t c_ispeed;
speed_t c_ospeed; speed_t c_ospeed;
}; };
#ifndef BOTHER
#define BOTHER CBAUDEX #define BOTHER CBAUDEX
#endif
termios2 ios; termios2 ios;
handle_errno(::ioctl(handle, TCGETS2, &ios)); handle_errno(::ioctl(handle, TCGETS2, &ios));