From 2ff794d299b0426d1f2a523523260efad84a9837 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Wed, 12 Feb 2014 21:08:23 +0100 Subject: [PATCH] Fix some warnings --- Source/Core/Common/Timer.cpp | 3 ++- Source/Core/Core/CoreTiming.cpp | 2 +- Source/Core/Core/PowerPC/JitArm32/JitArm_BackPatch.cpp | 2 +- Source/Core/DolphinWX/ISOFile.cpp | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/Core/Common/Timer.cpp b/Source/Core/Common/Timer.cpp index 91a2a2d3ad..a2e08bbf1d 100644 --- a/Source/Core/Common/Timer.cpp +++ b/Source/Core/Common/Timer.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include +#include #ifdef _WIN32 #include @@ -113,7 +114,7 @@ std::string Timer::GetTimeElapsedFormatted() const // Hours u32 Hours = Minutes / 60; - std::string TmpStr = StringFromFormat("%02i:%02i:%02i:%03lu", + std::string TmpStr = StringFromFormat("%02i:%02i:%02i:%03" PRIu64, Hours, Minutes % 60, Seconds % 60, Milliseconds % 1000); return TmpStr; } diff --git a/Source/Core/Core/CoreTiming.cpp b/Source/Core/Core/CoreTiming.cpp index ace2c9759c..ceda4a668b 100644 --- a/Source/Core/Core/CoreTiming.cpp +++ b/Source/Core/Core/CoreTiming.cpp @@ -469,7 +469,7 @@ std::string GetScheduledEventsSummary() if (!name) name = "[unknown]"; - text += StringFromFormat("%s : %li %08lx%08lx\n", name, ptr->time, ptr->userdata >> 32, ptr->userdata); + text += StringFromFormat("%s : %" PRIi64 " %016" PRIx64 "\n", name, ptr->time, ptr->userdata); ptr = ptr->next; } return text; diff --git a/Source/Core/Core/PowerPC/JitArm32/JitArm_BackPatch.cpp b/Source/Core/Core/PowerPC/JitArm32/JitArm_BackPatch.cpp index bb085e96a8..79fb88a7d5 100644 --- a/Source/Core/Core/PowerPC/JitArm32/JitArm_BackPatch.cpp +++ b/Source/Core/Core/PowerPC/JitArm32/JitArm_BackPatch.cpp @@ -90,7 +90,7 @@ const u8 *JitArm::BackPatch(u8 *codePtr, u32, void *ctx_void) if (!DisamLoadStore(Value, rD, accessSize, Store)) { - printf("Invalid backpatch at location 0x%08x(0x%08x)\n", ctx->CTX_PC, Value); + printf("Invalid backpatch at location 0x%08lx(0x%08x)\n", ctx->CTX_PC, Value); exit(0); } diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp index 5aa02f5df1..cb3e01eda4 100644 --- a/Source/Core/DolphinWX/ISOFile.cpp +++ b/Source/Core/DolphinWX/ISOFile.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "Common.h" #include "CommonPaths.h" @@ -188,7 +189,7 @@ std::string GameListItem::CreateCacheFilename() // Filename.extension_HashOfFolderPath_Size.cache // Append hash to prevent ISO name-clashing in different folders. - Filename.append(StringFromFormat("%s_%x_%zx.cache", + Filename.append(StringFromFormat("%s_%x_%" PRIx64 ".cache", extension.c_str(), HashFletcher((const u8 *)LegalPathname.c_str(), LegalPathname.size()), File::GetSize(m_FileName)));