X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5a3912f2aba8f5232315f7ca2206c50295ec21ea..e1983ab58804a0e32ab2d832ded0349af1cc0476:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 0df53ba158..293e9feecf 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -751,7 +751,7 @@ wxContractPath (const wxString& filename, const wxString& envname, const wxStrin #endif // Handle User's home (ignore root homes!) - size_t len; + size_t len = 0; if ((val = wxGetUserHome (user)) != NULL && (len = wxStrlen(val)) > 2 && wxStrncmp(dest, val, len) == 0) @@ -913,7 +913,7 @@ wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) int i; int j; OSErr theErr; - OSStatus theStatus; + OSStatus theStatus = noErr; Boolean isDirectory = FALSE; Str255 theParentPath = "\p"; FSSpec theParentSpec; @@ -1095,7 +1095,7 @@ wxString wxMacFSSpec2UnixFilename( const FSSpec *spec ) return wxMac2UnixFilename( wxMacFSSpec2MacFilename( spec) ) ; } -void wxUnixFilename2FSSpec( const char *path , FSSpec *spec ) +void wxUnixFilename2FSSpec( const wxChar *path , FSSpec *spec ) { wxString var = wxUnix2MacFilename( path ) ; wxMacFilename2FSSpec( var , spec ) ; @@ -1303,6 +1303,7 @@ bool wxRemoveFile(const wxString& file) #if defined(__VISUALC__) \ || defined(__BORLANDC__) \ || defined(__WATCOMC__) \ + || defined(__DMC__) \ || defined(__GNUWIN32__) int res = wxRemove(file); #elif defined(__WXMAC__) @@ -1396,7 +1397,7 @@ bool wxPathExists(const wxChar *pszPathName) #ifdef __OS2__ // OS/2 can't handle "d:", it wants either "d:\" or "d:." - if (strPath.length() == 2 && strPath[1] == _T(':')) + if (strPath.length() == 2 && strPath[1u] == _T(':')) strPath << _T('.'); #endif @@ -1591,7 +1592,7 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) ok = getcwd(cbuf, sz) != NULL; #endif // platform - #if wxUSE_UNICODE && !defined(__WXMAC__) + #if wxUSE_UNICODE && !(defined(__WXMAC__) && !defined(__DARWIN__)) // finally convert the result to Unicode if needed wxConvFile.MB2WC(buf, cbuf, sz); #endif // wxUSE_UNICODE