From a886f6e7e1eb5031ab4613d979f0b520404fe6f9 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Sat, 27 Jun 2015 21:35:17 +0200 Subject: [PATCH] Fix some gcc warnings. --- pcsx2/gui/Dialogs/ConvertMemoryCardDialog.cpp | 3 +++ pcsx2/gui/MemoryCardFolder.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pcsx2/gui/Dialogs/ConvertMemoryCardDialog.cpp b/pcsx2/gui/Dialogs/ConvertMemoryCardDialog.cpp index 9c2766794a..0185cdc5be 100644 --- a/pcsx2/gui/Dialogs/ConvertMemoryCardDialog.cpp +++ b/pcsx2/gui/Dialogs/ConvertMemoryCardDialog.cpp @@ -119,6 +119,9 @@ void Dialogs::ConvertMemoryCardDialog::OnOk_Click( wxCommandEvent& evt ) { case MemoryCardType::MemoryCard_Folder: success = ConvertToFolder( sourcePath, targetPath ); break; + default: + Msgbox::Alert( _( "This target type is not supported!" ), _( "Convert memory card" ) ); + return; } } diff --git a/pcsx2/gui/MemoryCardFolder.cpp b/pcsx2/gui/MemoryCardFolder.cpp index 15c251c67b..a0c125a219 100644 --- a/pcsx2/gui/MemoryCardFolder.cpp +++ b/pcsx2/gui/MemoryCardFolder.cpp @@ -1172,9 +1172,9 @@ bool FileAccessHelper::CleanMemcardFilename( char* name ) { const char illegalChars[] = { '\\', '%', ':', '|', '"', '<', '>' }; bool cleaned = false; - for ( int i = 0; i < sizeof( illegalChars ); ++i ) { + for ( size_t i = 0; i < sizeof( illegalChars ); ++i ) { // this sizeof looks really odd but I couldn't get MemoryCardFileEntry::entry.data.name (or variants) working, feel free to replace with something equivalent but nicer looking - for ( int j = 0; j < sizeof( ( (MemoryCardFileEntry*)0 )->entry.data.name ); ++j ) { + for ( size_t j = 0; j < sizeof( ( (MemoryCardFileEntry*)0 )->entry.data.name ); ++j ) { if ( name[j] == illegalChars[i] ) { name[j] = '_'; cleaned = true;