From: Włodzimierz Skiba Date: Fri, 11 Mar 2005 15:12:57 +0000 (+0000) Subject: Warning and build fixes focused with Borland and Watcom. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2cdd63c6b1d473ffd7726f619085997b0737952e?ds=inline Warning and build fixes focused with Borland and Watcom. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/debugrpt.cpp b/src/common/debugrpt.cpp index ef86029ab8..34e2c9b3ad 100644 --- a/src/common/debugrpt.cpp +++ b/src/common/debugrpt.cpp @@ -178,7 +178,7 @@ void XmlStackWalker::OnStackFrame(const wxStackFrame& frame) wxDebugReport::wxDebugReport() { // get a temporary directory name - wxString appname(wxTheApp ? wxTheApp->GetAppName() : _T("wx")); + wxString appname = GetReportName(); // we can't use CreateTempFileName() because it creates a file, not a // directory, so do our best to create a unique name ourselves @@ -223,7 +223,7 @@ wxDebugReport::~wxDebugReport() if ( !m_dir.empty() ) { - if ( wxRmDir(m_dir) != 0 ) + if ( wxRmDir(m_dir.fn_str()) != 0 ) { wxLogSysError(_("Failed to clean up debug report directory \"%s\""), m_dir.c_str()); @@ -237,7 +237,10 @@ wxDebugReport::~wxDebugReport() wxString wxDebugReport::GetReportName() const { - return wxString(wxTheApp ? wxTheApp->GetAppName() : _T("wx")); + if(wxTheApp) + return wxTheApp->GetAppName(); + + return _T("wx"); } void wxDebugReport::AddFile(const wxString& name, const wxString& description) @@ -279,6 +282,10 @@ void wxDebugReport::AddAll(Context context) #if wxUSE_CRASHREPORT AddDump(context); #endif // wxUSE_CRASHREPORT + +#if !wxUSE_STACKWALKER && !wxUSE_CRASHREPORT + wxUnusedVar(context); +#endif } // ---------------------------------------------------------------------------- @@ -560,7 +567,8 @@ bool wxDebugReportCompress::DoProcess() if ( !zos.PutNextEntry(ze) ) return false; - wxFFileInputStream is(wxFileName(fn.GetPath(), name).GetFullPath()); + wxFileName filename(fn.GetPath(), name); + wxFFileInputStream is(filename.GetFullPath()); if ( !is.IsOk() || !zos.Write(is).IsOk() ) return false; }