From b7f1175f0a14ac053dc01c3e431505008f49e978 Mon Sep 17 00:00:00 2001 From: dashodanger Date: Sat, 22 Jun 2024 19:34:43 -0600 Subject: [PATCH] Address some CI complaints --- source/g_doom.cc | 8 ++++---- source/g_doom.h | 2 ++ source/g_wolf.cc | 8 ++++---- source/m_lua.cc | 6 +++--- source/main.cc | 8 +++++--- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/source/g_doom.cc b/source/g_doom.cc index 636c90b19..6676e28fb 100644 --- a/source/g_doom.cc +++ b/source/g_doom.cc @@ -330,7 +330,7 @@ bool BuildNodes(std::string filename) if (AJBSP_BuildNodes(filename, &build_info) != 0) { - ProgStatus(_("AJBSP Error!")); + ProgStatus("%s", _("AJBSP Error!")); return false; } @@ -1376,7 +1376,7 @@ bool Doom::game_interface_c::Start(const char *preset) if (filename.empty()) { - ProgStatus(_("Cancelled")); + ProgStatus("%s", _("Cancelled")); return false; } @@ -1425,14 +1425,14 @@ bool Doom::game_interface_c::Start(const char *preset) } if (!ZIPF_OpenWrite(zip_filename)) { - ProgStatus(_("Error (create PK3/ZIP)"), zip_filename.c_str()); + ProgStatus("%s", _("Error (create PK3/ZIP)"), zip_filename.c_str()); return false; } } if (!StartWAD(filename)) { - ProgStatus(_("Error (create file)")); + ProgStatus("%s", _("Error (create file)")); return false; } diff --git a/source/g_doom.h b/source/g_doom.h index 3c6a730cf..15c598bf7 100644 --- a/source/g_doom.h +++ b/source/g_doom.h @@ -21,6 +21,8 @@ #pragma once +#include + #include #include diff --git a/source/g_wolf.cc b/source/g_wolf.cc index 486c8d8fc..82437363a 100644 --- a/source/g_wolf.cc +++ b/source/g_wolf.cc @@ -434,7 +434,7 @@ bool wolf_game_interface_c::Start(const char *ext) break; case 1: - ProgStatus(_("Cancelled")); + ProgStatus("%s", _("Cancelled")); return false; default: @@ -471,7 +471,7 @@ bool wolf_game_interface_c::Start(const char *ext) { LogPrint("Unable to create map file:\n%s", strerror(errno)); - ProgStatus(_("Error (create file)")); + ProgStatus("%s", _("Error (create file)")); return false; } @@ -483,7 +483,7 @@ bool wolf_game_interface_c::Start(const char *ext) LogPrint("Unable to create %s:\n%s", TEMP_HEADFILE, strerror(errno)); - ProgStatus(_("Error (create file)")); + ProgStatus("%s", _("Error (create file)")); return false; } @@ -528,7 +528,7 @@ bool wolf_game_interface_c::Finish(bool build_ok) if (write_errors_seen > 0) { - ProgStatus(_("Error (write file)")); + ProgStatus("%s", _("Error (write file)")); Tidy(); return false; } diff --git a/source/m_lua.cc b/source/m_lua.cc index e3adb3328..19d6f6f32 100644 --- a/source/m_lua.cc +++ b/source/m_lua.cc @@ -2158,7 +2158,7 @@ void ob_invoke_hook(std::string hookname) if (!Script_CallFunc("ob_invoke_hook", 0, ¶ms[0])) { - ProgStatus(_("Script Error")); + ProgStatus("%s", _("Script Error")); } } @@ -2174,7 +2174,7 @@ bool ob_build_cool_shit() .c_str()); } #endif - ProgStatus(_("Script Error")); + ProgStatus("%s", _("Script Error")); #ifndef CONSOLE_ONLY if (main_win) { @@ -2199,7 +2199,7 @@ bool ob_build_cool_shit() return true; } - ProgStatus(_("Cancelled")); + ProgStatus("%s", _("Cancelled")); return false; } diff --git a/source/main.cc b/source/main.cc index 07bb8f2ce..14a04b861 100644 --- a/source/main.cc +++ b/source/main.cc @@ -40,10 +40,12 @@ #include "physfs.h" #include "sys_xoshiro.h" #ifndef CONSOLE_ONLY +#ifndef _WIN32 +#include +#endif #include #include #include - #include "ui_boxes.h" #include "ui_window.h" #endif @@ -1142,7 +1144,7 @@ bool Build_Cool_Shit() } if (was_ok) { - ProgStatus(_("Success")); + ProgStatus("%s", _("Success")); const uint32_t end_time = TimeGetMillies(); const uint32_t total_time = end_time - start_time; @@ -1192,7 +1194,7 @@ bool Build_Cool_Shit() .c_str()); } #endif - ProgStatus(_("Cancelled")); + ProgStatus("%s", _("Cancelled")); } // Insurance in case the build process errored/cancelled