Fix format string warnings

This commit is contained in:
Tillmann Karras
2013-10-26 11:55:41 +02:00
parent 39ad5a2f7a
commit 268bdf19ce
24 changed files with 75 additions and 41 deletions

View File

@ -36,6 +36,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <cinttypes>
#ifndef _WIN32
#include <unistd.h> // for unlink()
@ -196,7 +197,7 @@ bool SDCardCreate(u64 disk_size /*in MB*/, const char* filename)
disk_size *= 1024 * 1024;
if (disk_size < 0x800000 || disk_size > 0x800000000ULL) {
ERROR_LOG(COMMON, "Trying to create SD Card image of size %lliMB is out of range (8MB-32GB)", disk_size/(1024*1024));
ERROR_LOG(COMMON, "Trying to create SD Card image of size %" PRIu64 "MB is out of range (8MB-32GB)", disk_size/(1024*1024));
return false;
}

View File

@ -5,6 +5,8 @@
#include "FileUtil.h"
#include "SysConf.h"
#include <cinttypes>
SysConf::SysConf()
: m_IsValid(false)
{
@ -42,7 +44,7 @@ bool SysConf::LoadFromFile(const char *filename)
u64 size = File::GetSize(filename);
if (size != SYSCONF_SIZE)
{
if (AskYesNoT("Your SYSCONF file is the wrong size.\nIt should be 0x%04x (but is 0x%04llx)\nDo you want to generate a new one?",
if (AskYesNoT("Your SYSCONF file is the wrong size.\nIt should be 0x%04x (but is 0x%04" PRIx64 ")\nDo you want to generate a new one?",
SYSCONF_SIZE, size))
{
GenerateSysConf();

View File

@ -7,6 +7,8 @@
#include "x64ABI.h"
#include "CPUDetect.h"
#include <cinttypes>
namespace Gen
{
@ -176,7 +178,7 @@ void OpArg::WriteRest(XEmitter *emit, int extraBytes, X64Reg _operandReg,
_assert_msg_(DYNA_REC, (distance < 0x80000000LL
&& distance >= -0x80000000LL) ||
!warn_64bit_offset,
"WriteRest: op out of range (0x%llx uses 0x%llx)",
"WriteRest: op out of range (0x%" PRIx64 " uses 0x%" PRIx64 ")",
ripAddr, offset);
s32 offs = (s32)distance;
emit->Write32((u32)offs);