summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mai.iam2048@gmail.com>2023-12-12 17:01:29 -0500
committerLioncash <mai.iam2048@gmail.com>2023-12-12 17:01:32 -0500
commit81d5370141fcd18a4bece20f5d399d0622079fde (patch)
tree5d807824db343dd0807aafd80c0779e025298a83 /Source/Core
parenta812a1f93875ed5e21a21c52658bfee75e0e3ea4 (diff)
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.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HLE/HLE_OS.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/Core/Core/HLE/HLE_OS.cpp b/Source/Core/Core/HLE/HLE_OS.cpp
index e3a1decbf6..52f3b43deb 100644
--- a/Source/Core/Core/HLE/HLE_OS.cpp
+++ b/Source/Core/Core/HLE/HLE_OS.cpp
@@ -215,8 +215,8 @@ namespace
class HLEPrintArgsVAList final : public HLEPrintArgs
{
public:
- HLEPrintArgsVAList(const Core::CPUThreadGuard& guard, HLE::SystemVABI::VAList* va_list)
- : m_guard(guard), m_va_list(va_list)
+ HLEPrintArgsVAList(const Core::CPUThreadGuard& guard, HLE::SystemVABI::VAList* list)
+ : m_guard(guard), m_va_list(list)
{
}
@@ -305,15 +305,15 @@ std::string GetStringVA(HLEPrintArgs* args, std::string_view string)
if (string[i] == '*')
{
++i;
- const s32 result = Common::BitCast<s32>(args->GetU32());
- if (result >= 0)
- return static_cast<u32>(result);
+ const s32 result_tmp = Common::BitCast<s32>(args->GetU32());
+ if (result_tmp >= 0)
+ return static_cast<u32>(result_tmp);
if (left_justified_flag_ptr)
{
// field width; this results in positive field width and left_justified flag set
*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
@@ -329,10 +329,10 @@ std::string GetStringVA(HLEPrintArgs* args, std::string_view string)
++start;
if (start == i)
return 0;
- u32 result = 0;
+ u32 result_tmp = 0;
const std::string tmp(string, start, i - start);
- if (TryParse(tmp, &result, 10))
- return result;
+ if (TryParse(tmp, &result_tmp, 10))
+ return result_tmp;
}
return std::nullopt;