diff --git a/common/include/x86emitter/implement/dwshift.h b/common/include/x86emitter/implement/dwshift.h index 689b74639a..1b582ba365 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, 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, 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, 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, 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 42c9a8c7c8..b445bd2fb0 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, 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, 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 43cdfae279..c3f316183b 100644 --- a/common/src/Utilities/ThreadTools.cpp +++ b/common/src/Utilities/ThreadTools.cpp @@ -144,8 +144,6 @@ void Threading::PersistentThread::Start() if( pthread_create( &m_thread, NULL, _internal_callback, this ) != 0 ) throw Exception::ThreadCreationError(); - - m_detached = false; } // Returns: TRUE if the detachment was performed, or FALSE if the thread was @@ -382,7 +380,8 @@ wxString Threading::PersistentThread::GetName() const // private member, and provide a new Task executor by a different name). void Threading::PersistentThread::OnStartInThread() { - m_running = true; + m_running = true; + m_detached = false; } void Threading::PersistentThread::_internal_execute() @@ -433,7 +432,7 @@ void Threading::PersistentThread::_DoSetThreadName( const char* name ) #if defined(_WINDOWS_) && defined (_MSC_VER) // This code sample was borrowed form some obscure MSDN article. - // In a rare bout of sanity, it's an actual Micrsoft-published hack + // In a rare bout of sanity, it's an actual Microsoft-published hack // that actually works! static const int MS_VC_EXCEPTION = 0x406D1388; @@ -441,10 +440,10 @@ void Threading::PersistentThread::_DoSetThreadName( const char* name ) #pragma pack(push,8) struct THREADNAME_INFO { - DWORD dwType; // Must be 0x1000. - LPCSTR szName; // Pointer to name (in user addr space). - DWORD dwThreadID; // Thread ID (-1=caller thread). - DWORD dwFlags; // Reserved for future use, must be zero. + DWORD dwType; // Must be 0x1000. + LPCSTR szName; // Pointer to name (in user addr space). + DWORD dwThreadID; // Thread ID (-1=caller thread). + DWORD dwFlags; // Reserved for future use, must be zero. }; #pragma pack(pop) @@ -454,13 +453,9 @@ void Threading::PersistentThread::_DoSetThreadName( const char* name ) info.dwThreadID = GetCurrentThreadId(); info.dwFlags = 0; - __try - { + __try { RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info ); - } - __except(EXCEPTION_EXECUTE_HANDLER) - { - } + } __except(EXCEPTION_EXECUTE_HANDLER) { } #endif } diff --git a/pcsx2/CDVD/CDVDaccess.cpp b/pcsx2/CDVD/CDVDaccess.cpp index 0600e7a775..e2e7bcd9ed 100644 --- a/pcsx2/CDVD/CDVDaccess.cpp +++ b/pcsx2/CDVD/CDVDaccess.cpp @@ -497,7 +497,7 @@ s32 CALLBACK NODISCdummyS32() return 0; } -void CALLBACK NODISCnewDiskCB( void (*callback)()) +void CALLBACK NODISCnewDiskCB(void (* /* callback */)()) { } diff --git a/pcsx2/CDVD/CDVDisoReader.cpp b/pcsx2/CDVD/CDVDisoReader.cpp index e0993443c8..beabdc1e17 100644 --- a/pcsx2/CDVD/CDVDisoReader.cpp +++ b/pcsx2/CDVD/CDVDisoReader.cpp @@ -396,7 +396,7 @@ s32 CALLBACK ISOdummyS32() return 0; } -void CALLBACK ISOnewDiskCB( void(*callback)()) +void CALLBACK ISOnewDiskCB(void(* /* callback */)()) { } diff --git a/pcsx2/Counters.cpp b/pcsx2/Counters.cpp index a4b53141bd..0ac1822c35 100644 --- a/pcsx2/Counters.cpp +++ b/pcsx2/Counters.cpp @@ -334,8 +334,7 @@ static __forceinline void frameLimit() // while( true ) { - iEnd = GetCPUTicks(); - sDeltaTime = iEnd - uExpectedEnd; + sDeltaTime = GetCPUTicks() - uExpectedEnd; if( sDeltaTime >= 0 ) break; Timeslice(); } diff --git a/pcsx2/Gif.h b/pcsx2/Gif.h index aa6e47d118..3c7cfda38a 100644 --- a/pcsx2/Gif.h +++ b/pcsx2/Gif.h @@ -45,9 +45,9 @@ enum gif_stat_flags GIF_STAT_P2Q = (1<<7), // PATH2 request Queued GIF_STAT_P1Q = (1<<8), // PATH1 request Queued GIF_STAT_OPH = (1<<9), // Output Path (Outputting Data) - GIF_STAT_APATH1 = (1<<10), // Data Transfer Path 1 (In progress) - GIF_STAT_APATH2 = (2<<10), // Data Transfer Path 2 (In progress) - GIF_STAT_APATH3 = (3<<10), // Data Transfer Path 3 (In progress) (Mask too) + GIF_STAT_APATH1 = (1<<10), // Data Transfer Path 1 (In progress) + GIF_STAT_APATH2 = (2<<10), // Data Transfer Path 2 (In progress) + GIF_STAT_APATH3 = (3<<10), // Data Transfer Path 3 (In progress) (Mask too) GIF_STAT_DIR = (1<<12), // Transfer Direction GIF_STAT_FQC = (31<<24) // QWC in GIF-FIFO }; @@ -239,10 +239,10 @@ struct GIFregisters extern Path3Modes Path3progress; extern void gsInterrupt(); -int _GIFchain(); -void GIFdma(); -void dmaGIF(); -void mfifoGIFtransfer(int qwc); -void gifMFIFOInterrupt(); +extern int _GIFchain(); +extern void GIFdma(); +extern void dmaGIF(); +extern void mfifoGIFtransfer(int qwc); +extern void gifMFIFOInterrupt(); #endif diff --git a/pcsx2/gui/Dialogs/ImportSettingsDialog.cpp b/pcsx2/gui/Dialogs/ImportSettingsDialog.cpp index e9369d5791..2d5a4dc978 100644 --- a/pcsx2/gui/Dialogs/ImportSettingsDialog.cpp +++ b/pcsx2/gui/Dialogs/ImportSettingsDialog.cpp @@ -53,14 +53,14 @@ Dialogs::ImportSettingsDialog::ImportSettingsDialog( wxWindow* parent ) : Connect( b_over->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ImportSettingsDialog::OnOverwrite_Click) ); } -void Dialogs::ImportSettingsDialog::OnImport_Click( wxCommandEvent& evt ) +void Dialogs::ImportSettingsDialog::OnImport_Click( wxCommandEvent& /* evt */ ) { AppConfig_OnChangedSettingsFolder( false ); // ... and import existing settings g_Conf->Folders.Bios.Mkdir(); EndModal( wxID_OK ); } -void Dialogs::ImportSettingsDialog::OnOverwrite_Click( wxCommandEvent& evt ) +void Dialogs::ImportSettingsDialog::OnOverwrite_Click( wxCommandEvent& /* evt */ ) { AppConfig_OnChangedSettingsFolder( true ); // ... and overwrite any existing settings g_Conf->Folders.Bios.Mkdir(); diff --git a/pcsx2/gui/Panels/PathsPanel.cpp b/pcsx2/gui/Panels/PathsPanel.cpp index da491e5346..32de87c3d7 100644 --- a/pcsx2/gui/Panels/PathsPanel.cpp +++ b/pcsx2/gui/Panels/PathsPanel.cpp @@ -37,7 +37,7 @@ Panels::DirPickerPanel& Panels::BasePathsPanel::AddDirPicker( wxBoxSizer& sizer, } // ------------------------------------------------------------------------ -Panels::StandardPathsPanel::StandardPathsPanel( wxWindow& parent, int idealWidth ) : +Panels::StandardPathsPanel::StandardPathsPanel( wxWindow& parent, int /* idealWidth */ ) : BasePathsPanel( parent ) { s_main.AddSpacer( BetweenFolderSpace );