From e331fac0043bdc28775f134928373797b0b09e58 Mon Sep 17 00:00:00 2001 From: Vitor Kiguchi Date: Wed, 22 Jul 2020 22:51:39 -0300 Subject: [PATCH] Resolve unused variable warnings (C4101 unreferenced local variable) --- src/core/cheats/gateway_cheat.cpp | 2 +- src/web_service/announce_room_json.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/cheats/gateway_cheat.cpp b/src/core/cheats/gateway_cheat.cpp index b36309d26..f5b5ff0b4 100644 --- a/src/core/cheats/gateway_cheat.cpp +++ b/src/core/cheats/gateway_cheat.cpp @@ -198,7 +198,7 @@ GatewayCheat::CheatLine::CheatLine(const std::string& line) { address = first & 0x0FFFFFFF; value = std::stoul(line.substr(9, 8), 0, 16); cheat_line = line; - } catch (const std::logic_error& e) { + } catch (const std::logic_error&) { type = CheatType::Null; cheat_line = line; LOG_ERROR(Core_Cheats, "Cheat contains invalid line: {}", line); diff --git a/src/web_service/announce_room_json.cpp b/src/web_service/announce_room_json.cpp index 44d0b0578..e64bd7ea4 100644 --- a/src/web_service/announce_room_json.cpp +++ b/src/web_service/announce_room_json.cpp @@ -30,7 +30,7 @@ void from_json(const nlohmann::json& json, Room::Member& member) { try { member.username = json.at("username").get(); member.avatar_url = json.at("avatarUrl").get(); - } catch (const nlohmann::detail::out_of_range& e) { + } catch (const nlohmann::detail::out_of_range&) { member.username = member.avatar_url = ""; LOG_DEBUG(Network, "Member \'{}\' isn't authenticated", member.nickname); } @@ -59,7 +59,7 @@ void from_json(const nlohmann::json& json, Room& room) { room.name = json.at("name").get(); try { room.description = json.at("description").get(); - } catch (const nlohmann::detail::out_of_range& e) { + } catch (const nlohmann::detail::out_of_range&) { room.description = ""; LOG_DEBUG(Network, "Room \'{}\' doesn't contain a description", room.name); }