diff --git a/src/ai/formula/function_table.cpp b/src/ai/formula/function_table.cpp index 258825cc520e..8dd51e99dc65 100644 --- a/src/ai/formula/function_table.cpp +++ b/src/ai/formula/function_table.cpp @@ -892,7 +892,7 @@ DEFINE_WFL_FUNCTION(set_unit_var, 3, 3) DEFINE_WFL_FUNCTION(fallback, 0, 1) { - (void)fdb; + UNUSED(fdb); // The parameter is not used, but is accepted for legacy compatibility if(args().size() == 1 && args()[0]->evaluate(variables).as_string() != "human") return variant(); diff --git a/src/campaign_server/campaign_server.cpp b/src/campaign_server/campaign_server.cpp index 4b18c5284eb5..68c5dfa5d198 100644 --- a/src/campaign_server/campaign_server.cpp +++ b/src/campaign_server/campaign_server.cpp @@ -452,7 +452,7 @@ void server::fire(const std::string& hook, const std::string& addon) } #if defined(_WIN32) - (void)addon; + UNUSED(addon); ERR_CS << "Tried to execute a script on an unsupported platform\n"; return; #else diff --git a/src/formula/function.cpp b/src/formula/function.cpp index a11c86758d5d..24678f9c9d52 100644 --- a/src/formula/function.cpp +++ b/src/formula/function.cpp @@ -608,8 +608,8 @@ DEFINE_WFL_FUNCTION(exp, 1, 1) DEFINE_WFL_FUNCTION(pi, 0, 0) { - (void)variables; - (void)fdb; + UNUSED(variables); + UNUSED(fdb); return variant(pi(), variant::DECIMAL_VARIANT); } diff --git a/src/gui/dialogs/lua_interpreter.cpp b/src/gui/dialogs/lua_interpreter.cpp index 81b546cea6f3..9111e2a6256b 100644 --- a/src/gui/dialogs/lua_interpreter.cpp +++ b/src/gui/dialogs/lua_interpreter.cpp @@ -232,7 +232,7 @@ class lua_interpreter::input_model { #endif void add_to_history (const std::string& str) { prefix_ = ""; - (void) str; + UNUSED(str); #ifdef HAVE_HISTORY add_history(str.c_str()); #endif @@ -294,7 +294,7 @@ class lua_interpreter::input_model { // reset, set history to the end and prefix_ to empty, and return the current prefix_ for the user to edit end_of_history_ = true; - (void) direction; + UNUSED(direction); std::string temp = prefix_; prefix_ = ""; return temp; @@ -358,7 +358,7 @@ class lua_interpreter::input_model { cmd = expansion; free(expansion); #endif - (void) cmd; + UNUSED(cmd); return false; } }; diff --git a/src/scripting/game_lua_kernel.cpp b/src/scripting/game_lua_kernel.cpp index d8bcb1b1b6de..e93902cf7bb6 100644 --- a/src/scripting/game_lua_kernel.cpp +++ b/src/scripting/game_lua_kernel.cpp @@ -1522,7 +1522,7 @@ int game_lua_kernel::impl_end_level_data_set(lua_State* L) static int impl_end_level_data_collect(lua_State* L) { end_level_data* data = static_cast(lua_touserdata(L, 1)); - (void)data; // Suppress an erroneous MSVC warning (a destructor call doesn't count as a reference) + UNUSED(data); // Suppress an erroneous MSVC warning (a destructor call doesn't count as a reference) data->~end_level_data(); return 0; } diff --git a/src/wesnoth.cpp b/src/wesnoth.cpp index 391fb89dc761..50fa58b9147e 100644 --- a/src/wesnoth.cpp +++ b/src/wesnoth.cpp @@ -1020,8 +1020,8 @@ int main(int argc, char** argv) #endif { #ifdef _WIN32 - (void)argc; - (void)argv; + UNUSED(argc); + UNUSED(argv); // windows argv is ansi encoded by default std::vector args =