mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 01:59:52 -06:00
Fix format string warnings
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
#include <wx/filename.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
|
||||
#include "FileSearch.h"
|
||||
@ -383,7 +384,7 @@ wxString NiceSizeFormat(u64 _size)
|
||||
auto const value = (_size + unit_size / 2) / unit_size;
|
||||
auto const frac = (_size % unit_size * 10 + unit_size / 2) / unit_size % 10;
|
||||
|
||||
return StrToWxStr(StringFromFormat("%llu.%llu %s", value, frac, unit_symbols[unit]));
|
||||
return StrToWxStr(StringFromFormat("%" PRIu64 ".%" PRIu64 " %s", value, frac, unit_symbols[unit]));
|
||||
}
|
||||
|
||||
void CGameListCtrl::InsertItemInReportView(long _Index)
|
||||
|
@ -188,7 +188,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_%llx.cache",
|
||||
Filename.append(StringFromFormat("%s_%x_%zx.cache",
|
||||
extension.c_str(), HashFletcher((const u8 *)LegalPathname.c_str(), LegalPathname.size()),
|
||||
File::GetSize(m_FileName)));
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#endif
|
||||
|
||||
#include <type_traits>
|
||||
#include <cinttypes>
|
||||
|
||||
#include "Common.h"
|
||||
#include "CommonPaths.h"
|
||||
@ -118,7 +119,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||
u8 _tTitleID[8];
|
||||
if(OpenISO->GetTitleID(_tTitleID))
|
||||
{
|
||||
snprintf(tmp, 17, "%016llx", Common::swap64(_tTitleID));
|
||||
snprintf(tmp, 17, "%016" PRIx64, Common::swap64(_tTitleID));
|
||||
_iniFilename = tmp;
|
||||
}
|
||||
}
|
||||
|
@ -7,12 +7,14 @@
|
||||
// Licensed under the terms of the GNU GPL, version 2
|
||||
// http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
|
||||
|
||||
#include <algorithm>
|
||||
#include <cinttypes>
|
||||
|
||||
#include "WiiSaveCrypted.h"
|
||||
#include "FileUtil.h"
|
||||
#include "MathUtil.h"
|
||||
#include "NandPaths.h"
|
||||
#include "FileUtil.h"
|
||||
#include <algorithm>
|
||||
|
||||
static Common::replace_v replacements;
|
||||
|
||||
@ -152,7 +154,7 @@ void CWiiSaveCrypted::ReadHDR()
|
||||
md5((u8*)&_header, HEADER_SZ, md5_calc);
|
||||
if (memcmp(md5_file, md5_calc, 0x10))
|
||||
{
|
||||
PanicAlertT("MD5 mismatch\n %016llx%016llx != %016llx%016llx", Common::swap64(md5_file),Common::swap64(md5_file+8), Common::swap64(md5_calc), Common::swap64(md5_calc+8));
|
||||
PanicAlertT("MD5 mismatch\n %016" PRIx64 "%016" PRIx64 " != %016" PRIx64 "%016" PRIx64, Common::swap64(md5_file),Common::swap64(md5_file+8), Common::swap64(md5_calc), Common::swap64(md5_calc+8));
|
||||
b_valid= false;
|
||||
}
|
||||
|
||||
@ -244,7 +246,7 @@ void CWiiSaveCrypted::ReadBKHDR()
|
||||
if (_sizeOfFiles + FULL_CERT_SZ != _totalSize)
|
||||
WARN_LOG(CONSOLE, "Size(%x) + cert(%x) does not equal totalsize(%x)", _sizeOfFiles, FULL_CERT_SZ, _totalSize);
|
||||
if (m_TitleID != Common::swap64(bkhdr.SaveGameTitle))
|
||||
WARN_LOG(CONSOLE, "Encrypted title (%llx) does not match unencrypted title (%llx)", m_TitleID, Common::swap64(bkhdr.SaveGameTitle));
|
||||
WARN_LOG(CONSOLE, "Encrypted title (%" PRIx64 ") does not match unencrypted title (%" PRIx64 ")", m_TitleID, Common::swap64(bkhdr.SaveGameTitle));
|
||||
}
|
||||
|
||||
void CWiiSaveCrypted::WriteBKHDR()
|
||||
|
Reference in New Issue
Block a user