diff --git a/Source/Core/Common/Src/Timer.cpp b/Source/Core/Common/Src/Timer.cpp index ef1861b7b3..903133640f 100644 --- a/Source/Core/Common/Src/Timer.cpp +++ b/Source/Core/Common/Src/Timer.cpp @@ -196,7 +196,7 @@ std::string Timer::GetTimeFormatted() struct timeb tp; (void)::ftime(&tp); char temp[32]; - sprintf(temp, "%02hi:%02i:%03i", tp.time/60, tp.time%60, tp.millitm); + sprintf(temp, "%02ld:%02ld:%03i", tp.time/60, tp.time%60, tp.millitm); return std::string(temp); } diff --git a/Source/Core/Core/Src/Boot/Boot.cpp b/Source/Core/Core/Src/Boot/Boot.cpp index 6a934999c2..af79f9b37a 100644 --- a/Source/Core/Core/Src/Boot/Boot.cpp +++ b/Source/Core/Core/Src/Boot/Boot.cpp @@ -95,7 +95,7 @@ std::string CBoot::GenerateMapFilename() { u64 TitleID = Loader.GetTitleID(); char tmpBuffer[32]; - sprintf(tmpBuffer, "%08x_%08x", TitleID>32, TitleID); + sprintf(tmpBuffer, "%08x_%08x", (u32)(TitleID >> 32) & 0xFFFFFFFF , (u32)TitleID & 0xFFFFFFFF ); return FULL_MAPS_DIR + std::string(tmpBuffer) + ".map"; } } diff --git a/Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp b/Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp index dd135db64b..ddaa1fccd8 100644 --- a/Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp +++ b/Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp @@ -23,8 +23,7 @@ #include "MemoryUtil.h" // english -SRAM sram_dump = { - 0x04, 0x6B, 0xFB, 0x91, 0x00, 0x00, 0x00, 0x00, +SRAM sram_dump= {{0x04, 0x6B, 0xFB, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x40, 0x05, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -32,10 +31,10 @@ SRAM sram_dump = { 0x21, 0x27, 0xD1, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x00, 0xFF, 0x4A, 0x00, 0x00, 0x00, 0x00 -}; +}}; // german -SRAM sram_dump_german = { +SRAM sram_dump_german = {{ 0x1F, 0x66, 0xE0, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xEA, 0x19, 0x40, 0x00, 0x00, 0x01, 0x3C, 0x12, 0xD5, 0xEA, 0xD3, @@ -44,7 +43,7 @@ SRAM sram_dump_german = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xFF, 0x00, 0x00, 0x00, 0x00 -}; +}}; // We should provide an option to choose from the above, or figure out the checksum (the algo in yagcd seems wrong) diff --git a/Source/Core/Core/Src/HW/SI_Device.cpp b/Source/Core/Core/Src/HW/SI_Device.cpp index 22b69961f0..8eed040eec 100644 --- a/Source/Core/Core/Src/HW/SI_Device.cpp +++ b/Source/Core/Core/Src/HW/SI_Device.cpp @@ -94,6 +94,10 @@ ISIDevice* SIDevice_Create(TSIDevices _SIDevice, int _iDeviceNumber) case SI_GBA: return new CSIDevice_GBA(_iDeviceNumber); break; + + default: + return new CSIDevice_Dummy(_iDeviceNumber); + break; } return NULL; diff --git a/Source/Core/Core/Src/HW/Sram.h b/Source/Core/Core/Src/HW/Sram.h index 5fd0bc5219..56bf046aab 100644 --- a/Source/Core/Core/Src/HW/Sram.h +++ b/Source/Core/Core/Src/HW/Sram.h @@ -52,7 +52,8 @@ distribution. #pragma pack(push,1) union SRAM -{ +{ + u8 p_SRAM[64]; struct _syssram { // Stored configuration value from the system SRAM area u8 checksum[2]; // holds the block checksum. u8 checksum_inv[2]; // holds the inverse block checksum @@ -73,7 +74,6 @@ union SRAM u8 flashID_chksum[4]; // 16bit checksum of unlock flash ID u8 __padding1[2]; // padding - libogc has this as [4]? I have it as 2 to make it 64 }syssram; - u8 p_SRAM[64]; }; #pragma pack(pop) #endif diff --git a/Source/Core/Core/Src/IPC_HLE/WiiMote_HID_Attr.cpp b/Source/Core/Core/Src/IPC_HLE/WiiMote_HID_Attr.cpp index dd0d90ce1b..fbe1492417 100644 --- a/Source/Core/Core/Src/IPC_HLE/WiiMote_HID_Attr.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WiiMote_HID_Attr.cpp @@ -269,4 +269,5 @@ const CAttribTable& GetAttribTable() } return m_AttribTable; -} \ No newline at end of file +} + diff --git a/Source/Core/Core/Src/IPC_HLE/WiiMote_HID_Attr.h b/Source/Core/Core/Src/IPC_HLE/WiiMote_HID_Attr.h index 391f9e6925..d2c8547188 100644 --- a/Source/Core/Core/Src/IPC_HLE/WiiMote_HID_Attr.h +++ b/Source/Core/Core/Src/IPC_HLE/WiiMote_HID_Attr.h @@ -37,4 +37,5 @@ const CAttribTable& GetAttribTable(); const u8* GetAttribPacket(u32 serviceHandle, u32 cont, u32& _size); -#endif \ No newline at end of file +#endif + diff --git a/Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp index 5049ed3a93..3387ee2eb9 100644 --- a/Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp +++ b/Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp @@ -313,7 +313,7 @@ bool Flatten(u32 address, int *realsize, BlockStats *st, BlockRegStats *gpa, Blo UGeckoInstruction untouched_op = Memory::ReadUnchecked_U32(code[i].address); if (untouched_op.OPCD == 1) // Do handle HLE instructions. inst = untouched_op; - _assert_msg_(GEKKO, inst.hex != 0, "Zero Op - Error flattening %08x op %08x", address + i*4, inst); + _assert_msg_(GEKKO, inst.hex != 0, "Zero Op - Error flattening %08x op %08x", address + i*4, inst.hex); code[i].inst = inst; code[i].branchTo = -1; code[i].branchToIndex = -1; @@ -321,7 +321,7 @@ bool Flatten(u32 address, int *realsize, BlockStats *st, BlockRegStats *gpa, Blo GekkoOPInfo *opinfo = GetOpInfo(inst); if (opinfo) numCycles += opinfo->numCyclesMinusOne + 1; - _assert_msg_(GEKKO, opinfo != 0, "Invalid Op - Error flattening %08x op %08x", address + i*4, inst); + _assert_msg_(GEKKO, opinfo != 0, "Invalid Op - Error flattening %08x op %08x", address + i*4, inst.hex); bool follow = false; u32 destination; if (inst.OPCD == 18) @@ -381,7 +381,7 @@ bool Flatten(u32 address, int *realsize, BlockStats *st, BlockRegStats *gpa, Blo code[i].wantsPS1 = false; const GekkoOPInfo *opinfo = GetOpInfo(code[i].inst); - _assert_msg_(GEKKO, opinfo != 0, "Invalid Op - Error scanning %08x op %08x",address+i*4,inst); + _assert_msg_(GEKKO, opinfo != 0, "Invalid Op - Error scanning %08x op %08x",address+i*4,inst.hex); int flags = opinfo->flags; if (flags & FL_TIMER) diff --git a/Source/Core/DiscIO/Src/BannerLoaderGC.cpp b/Source/Core/DiscIO/Src/BannerLoaderGC.cpp index 9afcb3d119..5134bb3bb7 100644 --- a/Source/Core/DiscIO/Src/BannerLoaderGC.cpp +++ b/Source/Core/DiscIO/Src/BannerLoaderGC.cpp @@ -131,6 +131,8 @@ CBannerLoaderGC::GetName(std::string _rName[]) } break; + default: + break; } return returnCode; @@ -196,6 +198,8 @@ CBannerLoaderGC::GetDescription(std::string* _rDescription) returnCode = true; } break; + default: + break; } return returnCode; } diff --git a/Source/Core/DiscIO/Src/Blob.cpp b/Source/Core/DiscIO/Src/Blob.cpp index 7055f3df2a..13c8d983ff 100644 --- a/Source/Core/DiscIO/Src/Blob.cpp +++ b/Source/Core/DiscIO/Src/Blob.cpp @@ -71,7 +71,7 @@ bool SectorReader::Read(u64 offset, u64 size, u8* out_ptr) while (remain > 0) { // Check if we are ready to do a large block read. > instead of >= so we don't bother if remain is only one block. - if (positionInBlock == 0 && remain > m_blocksize) + if (positionInBlock == 0 && remain > (u64)m_blocksize) { u64 num_blocks = remain / m_blocksize; ReadMultipleAlignedBlocks(block, num_blocks, out_ptr); @@ -110,7 +110,7 @@ bool SectorReader::Read(u64 offset, u64 size, u8* out_ptr) bool SectorReader::ReadMultipleAlignedBlocks(u64 block_num, u64 num_blocks, u8 *out_ptr) { - for (int i = 0; i < num_blocks; i++) + for (u64 i = 0; i < num_blocks; i++) { const u8 *data = GetBlockData(block_num + i); if (!data) diff --git a/Source/Core/DiscIO/Src/DriveBlob.cpp b/Source/Core/DiscIO/Src/DriveBlob.cpp index c4dcc85faf..e8f5ab22ad 100644 --- a/Source/Core/DiscIO/Src/DriveBlob.cpp +++ b/Source/Core/DiscIO/Src/DriveBlob.cpp @@ -100,9 +100,9 @@ namespace DiscIO void DriveReader::GetBlock(u64 block_num, u8 *out_ptr) { - u32 NotUsed; u8 * lpSector = new u8[m_blocksize]; #ifdef _WIN32 + u32 NotUsed; u64 offset = m_blocksize * block_num; LONG off_low = (LONG)offset & 0xFFFFFFFF; LONG off_high = (LONG)(offset >> 32); diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.h b/Source/Core/DiscIO/Src/NANDContentLoader.h index 1d9accb7d7..779c535067 100644 --- a/Source/Core/DiscIO/Src/NANDContentLoader.h +++ b/Source/Core/DiscIO/Src/NANDContentLoader.h @@ -76,4 +76,5 @@ private: } -#endif \ No newline at end of file +#endif + diff --git a/Source/Plugins/Plugin_Wiimote/Src/ConfigRecording.cpp b/Source/Plugins/Plugin_Wiimote/Src/ConfigRecording.cpp index d108281456..75a168265a 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/ConfigRecording.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/ConfigRecording.cpp @@ -531,4 +531,5 @@ void ConfigDialog::DoRecordMovement(int _x, int _y, int _z, const u8 *_IR, int _ UpdateGUI(); } } -///////////////////////////////// \ No newline at end of file +///////////////////////////////// + diff --git a/Source/Plugins/Plugin_Wiimote/Src/EmuDefinitions.cpp b/Source/Plugins/Plugin_Wiimote/Src/EmuDefinitions.cpp index 5dfc4d979c..797f3c539f 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/EmuDefinitions.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/EmuDefinitions.cpp @@ -74,3 +74,4 @@ KeyboardClassicController g_Cc; } // namespace #endif //_EMU_DECLARATIONS_ + diff --git a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.h b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.h index 0b1c7e1edd..109711b895 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.h +++ b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.h @@ -63,4 +63,5 @@ bool IRDataOK(struct wiimote_t* wm); }; // WiiMoteReal -#endif \ No newline at end of file +#endif +