Fix some warnings

This commit is contained in:
Tillmann Karras 2014-02-12 21:08:23 +01:00
parent 88526be3b5
commit 2ff794d299
4 changed files with 6 additions and 4 deletions

View File

@ -3,6 +3,7 @@
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <time.h> #include <time.h>
#include <cinttypes>
#ifdef _WIN32 #ifdef _WIN32
#include <Windows.h> #include <Windows.h>
@ -113,7 +114,7 @@ std::string Timer::GetTimeElapsedFormatted() const
// Hours // Hours
u32 Hours = Minutes / 60; 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); Hours, Minutes % 60, Seconds % 60, Milliseconds % 1000);
return TmpStr; return TmpStr;
} }

View File

@ -469,7 +469,7 @@ std::string GetScheduledEventsSummary()
if (!name) if (!name)
name = "[unknown]"; 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; ptr = ptr->next;
} }
return text; return text;

View File

@ -90,7 +90,7 @@ const u8 *JitArm::BackPatch(u8 *codePtr, u32, void *ctx_void)
if (!DisamLoadStore(Value, rD, accessSize, Store)) 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); exit(0);
} }

View File

@ -5,6 +5,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <wx/mstream.h> #include <wx/mstream.h>
#include <cinttypes>
#include "Common.h" #include "Common.h"
#include "CommonPaths.h" #include "CommonPaths.h"
@ -188,7 +189,7 @@ std::string GameListItem::CreateCacheFilename()
// Filename.extension_HashOfFolderPath_Size.cache // Filename.extension_HashOfFolderPath_Size.cache
// Append hash to prevent ISO name-clashing in different folders. // 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()), extension.c_str(), HashFletcher((const u8 *)LegalPathname.c_str(), LegalPathname.size()),
File::GetSize(m_FileName))); File::GetSize(m_FileName)));