Fix string formats

/root/cemu/src/Cafe/IOSU/legacy/iosu_acp.cpp:88:28: warning: format
specifies type 'unsigned long long *' but the argument has type 'uint64
*' (aka 'unsigned long *') [-Wformat]
                if (sscanf(text, "%llx", &value) == 0)
                                  ~~~~   ^~~~~~
                                  %lx
This commit is contained in:
bitscher 2022-09-03 17:59:39 -07:00
parent ce86e39f4b
commit fb551ffd0d

View file

@ -10,6 +10,8 @@
#include "Cafe/Filesystem/fsc.h" #include "Cafe/Filesystem/fsc.h"
#include "Cafe/HW/Espresso/PPCState.h" #include "Cafe/HW/Espresso/PPCState.h"
#include <inttypes.h>
static_assert(sizeof(acpMetaXml_t) == 0x3440); static_assert(sizeof(acpMetaXml_t) == 0x3440);
static_assert(offsetof(acpMetaXml_t, title_id) == 0x0000); static_assert(offsetof(acpMetaXml_t, title_id) == 0x0000);
static_assert(offsetof(acpMetaXml_t, boss_id) == 0x0008); static_assert(offsetof(acpMetaXml_t, boss_id) == 0x0008);
@ -85,7 +87,7 @@ namespace iosu
return; return;
const char* text = subElement->GetText(); const char* text = subElement->GetText();
uint64 value; uint64 value;
if (sscanf(text, "%llx", &value) == 0) if (sscanf(text, "%" SCNx64, &value) == 0)
return; return;
*v = _swapEndianU64(value); *v = _swapEndianU64(value);
} }