diff --git a/common/build/Utilities/Utilities.cbp b/common/build/Utilities/Utilities.cbp index 6b7419fa45..78afe01da4 100644 --- a/common/build/Utilities/Utilities.cbp +++ b/common/build/Utilities/Utilities.cbp @@ -58,6 +58,17 @@ + + + + + + + + + + + diff --git a/common/build/x86emitter/x86emitter.cbp b/common/build/x86emitter/x86emitter.cbp index 5e4039a552..7ff25bc070 100644 --- a/common/build/x86emitter/x86emitter.cbp +++ b/common/build/x86emitter/x86emitter.cbp @@ -59,6 +59,7 @@ + @@ -67,6 +68,8 @@ + + diff --git a/common/include/Pcsx2Defs.h b/common/include/Pcsx2Defs.h index 5cd4e4686b..818d1e3d48 100644 --- a/common/include/Pcsx2Defs.h +++ b/common/include/Pcsx2Defs.h @@ -189,7 +189,6 @@ # define PCSX2_ALIGNED16_EXTERN(x) extern __declspec(align(16)) x # define __naked __declspec(naked) -# define __unused /*unused*/ # define __noinline __declspec(noinline) # define __threadlocal __declspec(thread) @@ -244,7 +243,6 @@ This theoretically unoptimizes. Not having much luck so far. // happens *by design* like all the friggen time >_<) # define __fastcall __attribute__((fastcall)) -# define __unused __attribute__((unused)) # define _inline __inline__ __attribute__((unused)) # ifdef NDEBUG # define __forceinline __attribute__((always_inline,unused)) diff --git a/common/include/Utilities/Threading.h b/common/include/Utilities/Threading.h index 07a7d57179..b77cb671c7 100644 --- a/common/include/Utilities/Threading.h +++ b/common/include/Utilities/Threading.h @@ -314,7 +314,7 @@ namespace Threading // Section of methods for internal use only. void _DoSetThreadName( const wxString& name ); - void _DoSetThreadName( __unused const char* name ); + void _DoSetThreadName( const char* name ); void _internal_execute(); void _try_virtual_invoke( void (PersistentThread::*method)() ); void _ThreadCleanup(); diff --git a/common/include/x86emitter/implement/dwshift.h b/common/include/x86emitter/implement/dwshift.h index 427b7c5512..689b74639a 100644 --- a/common/include/x86emitter/implement/dwshift.h +++ b/common/include/x86emitter/implement/dwshift.h @@ -32,17 +32,17 @@ class DwordShiftImplAll public: // ---------- 32 Bit Interface ----------- - __forceinline void operator()( const xRegister32& to, const xRegister32& from, __unused const xRegisterCL& clreg ) const { xOpWrite0F( 0xa5 | m_shiftop, to, from ); } - __forceinline void operator()( void* dest, const xRegister32& from, __unused const xRegisterCL& clreg ) const { xOpWrite0F( 0xa5 | m_shiftop, from, dest ); } - __forceinline void operator()( const ModSibBase& dest, const xRegister32& from, __unused const xRegisterCL& clreg ) const { xOpWrite0F( 0xa5 | m_shiftop, from, dest ); } + __forceinline void operator()( const xRegister32& to, const xRegister32& from, const xRegisterCL& clreg ) const { xOpWrite0F( 0xa5 | m_shiftop, to, from ); } + __forceinline void operator()( void* dest, const xRegister32& from, const xRegisterCL& clreg ) const { xOpWrite0F( 0xa5 | m_shiftop, from, dest ); } + __forceinline void operator()( const ModSibBase& dest, const xRegister32& from, const xRegisterCL& clreg ) const { xOpWrite0F( 0xa5 | m_shiftop, from, dest ); } __forceinline void operator()( const xRegister32& to, const xRegister32& from, u8 shiftcnt ) const { if( shiftcnt != 0 ) xOpWrite0F( 0xa4 | m_shiftop, to, from ); } __forceinline void operator()( void* dest, const xRegister32& from, u8 shiftcnt ) const { if( shiftcnt != 0 ) xOpWrite0F( 0xa4 | m_shiftop, from, dest, shiftcnt ); } __forceinline void operator()( const ModSibBase& dest, const xRegister32& from, u8 shiftcnt ) const { if( shiftcnt != 0 ) xOpWrite0F( 0xa4 | m_shiftop, from, dest, shiftcnt ); } // ---------- 16 Bit Interface ----------- - __forceinline void operator()( const xRegister16& to, const xRegister16& from, __unused const xRegisterCL& clreg ) const { xOpWrite0F( 0x66, 0xa5 | m_shiftop, to, from ); } - __forceinline void operator()( void* dest, const xRegister16& from, __unused const xRegisterCL& clreg ) const { xOpWrite0F( 0x66, 0xa5 | m_shiftop, from, dest ); } - __forceinline void operator()( const ModSibBase& dest, const xRegister16& from, __unused const xRegisterCL& clreg ) const { xOpWrite0F( 0x66, 0xa5 | m_shiftop, from, dest ); } + __forceinline void operator()( const xRegister16& to, const xRegister16& from, const xRegisterCL& clreg ) const { xOpWrite0F( 0x66, 0xa5 | m_shiftop, to, from ); } + __forceinline void operator()( void* dest, const xRegister16& from, const xRegisterCL& clreg ) const { xOpWrite0F( 0x66, 0xa5 | m_shiftop, from, dest ); } + __forceinline void operator()( const ModSibBase& dest, const xRegister16& from, const xRegisterCL& clreg ) const { xOpWrite0F( 0x66, 0xa5 | m_shiftop, from, dest ); } __forceinline void operator()( const xRegister16& to, const xRegister16& from, u8 shiftcnt ) const { if( shiftcnt != 0 ) xOpWrite0F( 0x66, 0xa4 | m_shiftop, to, from ); } __forceinline void operator()( void* dest, const xRegister16& from, u8 shiftcnt ) const { if( shiftcnt != 0 ) xOpWrite0F( 0x66, 0xa4 | m_shiftop, from, dest, shiftcnt ); } __forceinline void operator()( const ModSibBase& dest, const xRegister16& from, u8 shiftcnt ) const { if( shiftcnt != 0 ) xOpWrite0F( 0x66, 0xa4 | m_shiftop, from, dest, shiftcnt ); } diff --git a/common/include/x86emitter/implement/group2.h b/common/include/x86emitter/implement/group2.h index 57506a2324..42c9a8c7c8 100644 --- a/common/include/x86emitter/implement/group2.h +++ b/common/include/x86emitter/implement/group2.h @@ -39,14 +39,14 @@ template< G2Type InstType > class Group2ImplAll { public: - template< typename T > __forceinline void operator()( const xRegister& to, __unused const xRegisterCL& from ) const + template< typename T > __forceinline void operator()( const xRegister& to, const xRegisterCL& from ) const { prefix16(); xWrite8( Is8BitOp() ? 0xd2 : 0xd3 ); EmitSibMagic( InstType, to ); } - template< typename T > __noinline void operator()( const ModSibStrict& sibdest, __unused const xRegisterCL& from ) const + template< typename T > __noinline void operator()( const ModSibStrict& sibdest, const xRegisterCL& from ) const { prefix16(); xWrite8( Is8BitOp() ? 0xd2 : 0xd3 ); diff --git a/common/src/Utilities/ThreadTools.cpp b/common/src/Utilities/ThreadTools.cpp index 4a5e2cafbf..43cdfae279 100644 --- a/common/src/Utilities/ThreadTools.cpp +++ b/common/src/Utilities/ThreadTools.cpp @@ -424,7 +424,7 @@ void Threading::PersistentThread::_DoSetThreadName( const wxString& name ) _DoSetThreadName( name.ToUTF8() ); } -void Threading::PersistentThread::_DoSetThreadName( __unused const char* name ) +void Threading::PersistentThread::_DoSetThreadName( const char* name ) { pxAssertMsg( IsSelf(), "Thread affinity error." ); // only allowed from our own thread, thanks. diff --git a/pcsx2/CDVD/CDVD_internal.h b/pcsx2/CDVD/CDVD_internal.h index f77c4c6b00..207d4a25f6 100644 --- a/pcsx2/CDVD/CDVD_internal.h +++ b/pcsx2/CDVD/CDVD_internal.h @@ -129,9 +129,9 @@ static const uint PSX_DVD_READSPEED = 1382400 + 256000; // normal is 1 Byte Time static const uint Cdvd_FullSeek_Cycles = (PSXCLK*100) / 1000; // average number of cycles per fullseek (100ms) static const uint Cdvd_FastSeek_Cycles = (PSXCLK*30) / 1000; // average number of cycles per fastseek (37ms) -static const __unused char *mg_zones[8] = {"Japan", "USA", "Europe", "Oceania", "Asia", "Russia", "China", "Mexico"}; +static const char *mg_zones[8] = {"Japan", "USA", "Europe", "Oceania", "Asia", "Russia", "China", "Mexico"}; -static const __unused char *nCmdName[0x100]= { +static const char *nCmdName[0x100]= { "CdSync", "CdNop", "CdStandby", @@ -168,7 +168,7 @@ enum nCmds N_CD_CHG_SPDL_CTRL = 0x0F, // CdChgSpdlCtrl }; -static const __unused char *sCmdName[0x100]= { +static const char *sCmdName[0x100]= { "", "sceCdGetDiscType", "sceCdReadSubQ", "subcommands",//sceCdGetMecaconVersion, read/write console id, read renewal date "", "sceCdTrayState", "sceCdTrayCtrl", "", "sceCdReadClock", "sceCdWriteClock", "sceCdReadNVM", "sceCdWriteNVM", @@ -232,4 +232,4 @@ static NVMLayout nvmlayouts[NVM_FORMAT_MAX] = {0x146, 0x270, 0x2B0, 0x200, 0x1C8, 0x1E0, 0x1B0, 0x180, 0x198}, // eeproms from bios v1.70 and up }; -#endif \ No newline at end of file +#endif diff --git a/pcsx2/CDVD/CDVDaccess.cpp b/pcsx2/CDVD/CDVDaccess.cpp index fc3756abfc..0600e7a775 100644 --- a/pcsx2/CDVD/CDVDaccess.cpp +++ b/pcsx2/CDVD/CDVDaccess.cpp @@ -497,7 +497,7 @@ s32 CALLBACK NODISCdummyS32() return 0; } -void CALLBACK NODISCnewDiskCB(__unused void (*callback)()) +void CALLBACK NODISCnewDiskCB( void (*callback)()) { } diff --git a/pcsx2/CDVD/CDVDisoReader.cpp b/pcsx2/CDVD/CDVDisoReader.cpp index 6510015f9d..e0993443c8 100644 --- a/pcsx2/CDVD/CDVDisoReader.cpp +++ b/pcsx2/CDVD/CDVDisoReader.cpp @@ -396,7 +396,7 @@ s32 CALLBACK ISOdummyS32() return 0; } -void CALLBACK ISOnewDiskCB(__unused void(*callback)()) +void CALLBACK ISOnewDiskCB( void(*callback)()) { } diff --git a/pcsx2/Linux/pcsx2.cbp b/pcsx2/Linux/pcsx2.cbp index 75da45c501..5568c5f69d 100644 --- a/pcsx2/Linux/pcsx2.cbp +++ b/pcsx2/Linux/pcsx2.cbp @@ -16,6 +16,7 @@