diff --git a/common/src/Utilities/Linux/LnxHostSys.cpp b/common/src/Utilities/Linux/LnxHostSys.cpp index cdcecb3161..dd94cbe5c0 100644 --- a/common/src/Utilities/Linux/LnxHostSys.cpp +++ b/common/src/Utilities/Linux/LnxHostSys.cpp @@ -17,6 +17,8 @@ #include "../PrecompiledHeader.h" #include "PageFaultSource.h" +#include + #include #include #include @@ -169,7 +171,7 @@ void HostSys::MmapResetPtr(void* base, size_t size) pxAssertRel ((uptr)result != (uptr)base, pxsFmt( "Virtual memory decommit failed: memory at 0x%08X -> 0x%08X could not be remapped. " - "This is likely caused by multi-thread memory contention.", base, base+size + "This is likely caused by multi-thread memory contention.", base, (uptr)base+size )); } diff --git a/pcsx2/CDVD/IsoFileFormats.cpp b/pcsx2/CDVD/IsoFileFormats.cpp index 540cf2f55a..a389123b27 100644 --- a/pcsx2/CDVD/IsoFileFormats.cpp +++ b/pcsx2/CDVD/IsoFileFormats.cpp @@ -78,7 +78,6 @@ bool isoFile::tryIsoType(u32 _size, s32 _offset, s32 _blockofs) bool isoFile::Detect( bool readType ) { char buf[32]; - int len = m_filename.Length(); m_type = ISOTYPE_ILLEGAL; diff --git a/pcsx2/Memory.cpp b/pcsx2/Memory.cpp index 547839bff5..beee3cdc40 100644 --- a/pcsx2/Memory.cpp +++ b/pcsx2/Memory.cpp @@ -92,7 +92,6 @@ static vtlbHandler null_handler, tlb_fallback_0, - tlb_fallback_1, tlb_fallback_2, tlb_fallback_3, tlb_fallback_4, diff --git a/pcsx2/PluginManager.cpp b/pcsx2/PluginManager.cpp index da172756a8..847cbada0d 100644 --- a/pcsx2/PluginManager.cpp +++ b/pcsx2/PluginManager.cpp @@ -1278,7 +1278,7 @@ void SysCorePlugins::Init( PluginsEnum_t pid ) if( !m_info[pid] || m_info[pid]->IsInitialized ) return; Console.Indent().WriteLn( "Init %s", tbl_PluginInfo[pid].shortname ); - if( NULL != m_info[pid]->CommonBindings.Init() ) + if( 0 != m_info[pid]->CommonBindings.Init() ) throw Exception::PluginInitError( pid ); m_info[pid]->IsInitialized = true; diff --git a/pcsx2/gui/AppAssert.cpp b/pcsx2/gui/AppAssert.cpp index f1f176b75d..c6b754b92e 100644 --- a/pcsx2/gui/AppAssert.cpp +++ b/pcsx2/gui/AppAssert.cpp @@ -19,89 +19,87 @@ #include +class StackDump : public wxStackWalker +{ +protected: + wxString m_stackTrace; + wxString m_srcFuncName; + bool m_ignoreDone; + int m_skipped; + +public: + StackDump( const FnChar_t* src_function_name ) + { + if( src_function_name != NULL ) + m_srcFuncName = fromUTF8(src_function_name); + + m_ignoreDone = false; + m_skipped = 0; + } + + const wxString& GetStackTrace() const { return m_stackTrace; } + +protected: + virtual void OnStackFrame(const wxStackFrame& frame) + { + wxString name( frame.GetName() ); + if( name.IsEmpty() ) + { + name = wxsFormat( L"%p ", frame.GetAddress() ); + } + /*else if( m_srcFuncName.IsEmpty() || m_srcFuncName == name ) + { + // FIXME: This logic isn't reliable yet. + // It's possible for our debug information to not match the function names returned by + // __pxFUNCTION__ (might happen in linux a lot, and could happen in win32 due to + // inlining on Dev aserts). The better approach is a system the queues up all the + // stacktrace info in individual wxStrings, and does a two-pass check -- first pass + // for the function name and, if not found, a second pass that just skips the first + // few stack entries. + + // It's important we only walk the stack once because Linux (argh, always linux!) has + // a really god aweful slow stack walker. + + // I'm not doing it right now because I've worked on this mess enough for one week. --air + + m_ignoreDone = true; + } + + if( !m_ignoreDone ) + { + m_skipped++; + return; + }*/ + + //wxString briefName; + wxString essenName; + + if( frame.HasSourceLocation() ) + { + wxFileName wxfn(frame.GetFileName()); + //briefName.Printf( L"(%s:%d)", wxfn.GetFullName().c_str(), frame.GetLine() ); + + wxfn.SetVolume( wxEmptyString ); + //int count = wxfn.GetDirCount(); + for( int i=0; i<2; ++i ) + wxfn.RemoveDir(0); + + essenName.Printf( L"%s:%d", wxfn.GetFullPath().c_str(), frame.GetLine() ); + } + + m_stackTrace += pxsFmt( L"[%02d] %-44s %s\n", + frame.GetLevel()-m_skipped, + name.c_str(), + essenName.c_str() + ); + } +}; + static wxString pxGetStackTrace( const FnChar_t* calledFrom ) { - wxString stackTrace; - - class StackDump : public wxStackWalker - { - protected: - wxString m_stackTrace; - wxString m_srcFuncName; - bool m_ignoreDone; - int m_skipped; - - public: - StackDump( const FnChar_t* src_function_name ) - { - if( src_function_name != NULL ) - m_srcFuncName = fromUTF8(src_function_name); - - m_ignoreDone = false; - m_skipped = 0; - } - - const wxString& GetStackTrace() const { return m_stackTrace; } - - protected: - virtual void OnStackFrame(const wxStackFrame& frame) - { - wxString name( frame.GetName() ); - if( name.IsEmpty() ) - { - name = wxsFormat( L"%p ", frame.GetAddress() ); - } - /*else if( m_srcFuncName.IsEmpty() || m_srcFuncName == name ) - { - // FIXME: This logic isn't reliable yet. - // It's possible for our debug information to not match the function names returned by - // __pxFUNCTION__ (might happen in linux a lot, and could happen in win32 due to - // inlining on Dev aserts). The better approach is a system the queues up all the - // stacktrace info in individual wxStrings, and does a two-pass check -- first pass - // for the function name and, if not found, a second pass that just skips the first - // few stack entries. - - // It's important we only walk the stack once because Linux (argh, always linux!) has - // a really god aweful slow stack walker. - - // I'm not doing it right now because I've worked on this mess enough for one week. --air - - m_ignoreDone = true; - } - - if( !m_ignoreDone ) - { - m_skipped++; - return; - }*/ - - //wxString briefName; - wxString essenName; - - if( frame.HasSourceLocation() ) - { - wxFileName wxfn(frame.GetFileName()); - //briefName.Printf( L"(%s:%d)", wxfn.GetFullName().c_str(), frame.GetLine() ); - - wxfn.SetVolume( wxEmptyString ); - int count = wxfn.GetDirCount(); - for( int i=0; i<2; ++i ) - wxfn.RemoveDir(0); - - essenName.Printf( L"%s:%d", wxfn.GetFullPath().c_str(), frame.GetLine() ); - } - - m_stackTrace += wxString::Format( L"[%02d] %-44s %s\n", - frame.GetLevel()-m_skipped, - name.c_str(), - essenName.c_str() - ); - } - }; - - StackDump dump( calledFrom ); - dump.Walk( 3 ); - return dump.GetStackTrace(); + StackDump dump( calledFrom ); + dump.Walk( 3 ); + return dump.GetStackTrace(); } #ifdef __WXDEBUG__ diff --git a/pcsx2/vtlb.cpp b/pcsx2/vtlb.cpp index 869db2b3ea..a7d9c35b85 100644 --- a/pcsx2/vtlb.cpp +++ b/pcsx2/vtlb.cpp @@ -35,7 +35,7 @@ #include "COP0.h" #include "R5900Exceptions.h" -#include "Utilities\MemsetFast.inl" +#include "Utilities/MemsetFast.inl" using namespace R5900; using namespace vtlb_private;