HLE_OS: Resolve -Wshadow warnings

We get a warning about shadowing the va_list type and just
run-of-the-mill variable shadowing, which we can easily fix.
This commit is contained in:
Lioncash 2023-12-12 17:01:29 -05:00
parent a812a1f938
commit 81d5370141

View File

@ -215,8 +215,8 @@ namespace
class HLEPrintArgsVAList final : public HLEPrintArgs class HLEPrintArgsVAList final : public HLEPrintArgs
{ {
public: public:
HLEPrintArgsVAList(const Core::CPUThreadGuard& guard, HLE::SystemVABI::VAList* va_list) HLEPrintArgsVAList(const Core::CPUThreadGuard& guard, HLE::SystemVABI::VAList* list)
: m_guard(guard), m_va_list(va_list) : m_guard(guard), m_va_list(list)
{ {
} }
@ -305,15 +305,15 @@ std::string GetStringVA(HLEPrintArgs* args, std::string_view string)
if (string[i] == '*') if (string[i] == '*')
{ {
++i; ++i;
const s32 result = Common::BitCast<s32>(args->GetU32()); const s32 result_tmp = Common::BitCast<s32>(args->GetU32());
if (result >= 0) if (result_tmp >= 0)
return static_cast<u32>(result); return static_cast<u32>(result_tmp);
if (left_justified_flag_ptr) if (left_justified_flag_ptr)
{ {
// field width; this results in positive field width and left_justified flag set // field width; this results in positive field width and left_justified flag set
*left_justified_flag_ptr = true; *left_justified_flag_ptr = true;
return static_cast<u32>(-static_cast<s64>(result)); return static_cast<u32>(-static_cast<s64>(result_tmp));
} }
// precision; this is ignored // precision; this is ignored
@ -329,10 +329,10 @@ std::string GetStringVA(HLEPrintArgs* args, std::string_view string)
++start; ++start;
if (start == i) if (start == i)
return 0; return 0;
u32 result = 0; u32 result_tmp = 0;
const std::string tmp(string, start, i - start); const std::string tmp(string, start, i - start);
if (TryParse(tmp, &result, 10)) if (TryParse(tmp, &result_tmp, 10))
return result; return result_tmp;
} }
return std::nullopt; return std::nullopt;