X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5dcf05ae082a2da39102dec13ab3ad4c483221c8..884470b12ee25b20796bfef11a9bfa5fb1e1511c:/src/common/memory.cpp?ds=inline diff --git a/src/common/memory.cpp b/src/common/memory.cpp index ee71e7fd3a..81245b504f 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -49,7 +49,7 @@ # endif #endif -#if !defined(__WATCOMC__) && !defined(__VMS__) +#if !defined(__WATCOMC__) && !defined(__VMS__) && !defined( __MWERKS__ ) && !defined(__SALFORDC__) #include #endif @@ -532,6 +532,8 @@ bool wxDebugContext::SetFile(const wxString& file) bool wxDebugContext::SetStandardError(void) { + // Obsolete +#if 0 #if !defined(_WINDLL) wxDebugStreamBuf *buf = new wxDebugStreamBuf; ostream *stream = new ostream(m_streamBuf); @@ -540,6 +542,8 @@ bool wxDebugContext::SetStandardError(void) #else return FALSE; #endif +#endif + return FALSE; } @@ -909,7 +913,7 @@ int wxDebugContext::CountObjectsLeft(bool sinceCheckpoint) wxMemStruct *from = NULL; if (sinceCheckpoint && checkPoint) from = checkPoint->m_next; - if (from == (wxMemStruct*) NULL) + else from = wxDebugContext::GetHead () ; for (wxMemStruct * st = from; st != 0; st = st->m_next) @@ -1036,7 +1040,8 @@ void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bo return (void *)malloc(size); } - char * buf = (char *) malloc(wxDebugContext::TotSize (size)); + int totSize = wxDebugContext::TotSize (size); + char * buf = (char *) malloc(totSize); if (!buf) { wxLogDebug("Call to malloc (%ld) failed.", (long)size); return 0;