Fix some gcc warnings.

This commit is contained in:
Admiral H. Curtiss 2015-06-27 21:35:17 +02:00
parent eab49dbfa3
commit a886f6e7e1
2 changed files with 5 additions and 2 deletions

View File

@ -119,6 +119,9 @@ void Dialogs::ConvertMemoryCardDialog::OnOk_Click( wxCommandEvent& evt ) {
case MemoryCardType::MemoryCard_Folder: case MemoryCardType::MemoryCard_Folder:
success = ConvertToFolder( sourcePath, targetPath ); success = ConvertToFolder( sourcePath, targetPath );
break; break;
default:
Msgbox::Alert( _( "This target type is not supported!" ), _( "Convert memory card" ) );
return;
} }
} }

View File

@ -1172,9 +1172,9 @@ bool FileAccessHelper::CleanMemcardFilename( char* name ) {
const char illegalChars[] = { '\\', '%', ':', '|', '"', '<', '>' }; const char illegalChars[] = { '\\', '%', ':', '|', '"', '<', '>' };
bool cleaned = false; 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 // 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] ) { if ( name[j] == illegalChars[i] ) {
name[j] = '_'; name[j] = '_';
cleaned = true; cleaned = true;