Updates to fix Watcom C/C++ 11.0 compiler warning problems. Now compiles
clean with this compiler. Hopefully I did this without breaking other compilers. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -444,7 +444,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
||||
{
|
||||
register wxChar *d, *s, *nm;
|
||||
wxChar lnm[_MAXPATHLEN];
|
||||
int q;
|
||||
int q;
|
||||
|
||||
// Some compilers don't like this line.
|
||||
// const wxChar trimchars[] = wxT("\n \t");
|
||||
@@ -500,7 +500,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
||||
}
|
||||
else
|
||||
#else
|
||||
while ((*d++ = *s)) {
|
||||
while ((*d++ = *s) != NULL) {
|
||||
# ifndef __WXMSW__
|
||||
if (*s == wxT('\\')) {
|
||||
if ((*(d - 1) = *++s)) {
|
||||
@@ -520,13 +520,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
||||
register wxChar *start = d;
|
||||
register int braces = (*s == wxT('{') || *s == wxT('('));
|
||||
register wxChar *value;
|
||||
#ifdef __VISAGECPP__
|
||||
// VA gives assignment in logical expr warning
|
||||
while (*d)
|
||||
*d++ = *s;
|
||||
#else
|
||||
while ((*d++ = *s))
|
||||
#endif
|
||||
while ((*d++ = *s) != NULL)
|
||||
if (braces ? (*s == wxT('}') || *s == wxT(')')) : !(wxIsalnum(*s) || *s == wxT('_')) )
|
||||
break;
|
||||
else
|
||||
@@ -534,12 +528,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
||||
*--d = 0;
|
||||
value = wxGetenv(braces ? start + 1 : start);
|
||||
if (value) {
|
||||
#ifdef __VISAGECPP__
|
||||
// VA gives assignment in logical expr warning
|
||||
for ((d = start - 1); (*d); *d++ = *value++);
|
||||
#else
|
||||
for ((d = start - 1); (*d++ = *value++););
|
||||
#endif
|
||||
for ((d = start - 1); (*d++ = *value++) != NULL;);
|
||||
d--;
|
||||
if (braces && *s)
|
||||
s++;
|
||||
@@ -591,13 +580,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
||||
*(d - 1) = SEP;
|
||||
}
|
||||
s = nm;
|
||||
#ifdef __VISAGECPP__
|
||||
// VA gives assignment in logical expr warning
|
||||
while (*d)
|
||||
*d++ = *s++;
|
||||
#else
|
||||
while ((*d++ = *s++));
|
||||
#endif
|
||||
while ((*d++ = *s++) != NULL);
|
||||
delete[] nm_tmp; // clean up alloc
|
||||
/* Now clean up the buffer */
|
||||
return wxRealPath(buf);
|
||||
@@ -1127,6 +1110,7 @@ bool wxMkdir(const wxString& dir, int perm)
|
||||
#elif defined(__WXPM__)
|
||||
if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's??
|
||||
#else // !MSW and !OS/2 VAC++
|
||||
(void)perm;
|
||||
if ( wxMkDir(wxFNSTRINGCAST wxFNCONV(dirname)) != 0 )
|
||||
#endif // !MSW/MSW
|
||||
{
|
||||
@@ -1708,7 +1692,7 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
|
||||
pb.ioRefNum = LMGetCurApRefNum();
|
||||
pb.ioFCBIndx = 0;
|
||||
error = PBGetFCBInfoSync(&pb);
|
||||
if ( error == noErr )
|
||||
if ( error == noErr )
|
||||
{
|
||||
cwdSpec.vRefNum = pb.ioFCBVRefNum;
|
||||
cwdSpec.parID = pb.ioFCBParID;
|
||||
@@ -1722,9 +1706,9 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
|
||||
buf[0] = 0 ;
|
||||
/*
|
||||
this version will not always give back the application directory on mac
|
||||
enum
|
||||
{
|
||||
SFSaveDisk = 0x214, CurDirStore = 0x398
|
||||
enum
|
||||
{
|
||||
SFSaveDisk = 0x214, CurDirStore = 0x398
|
||||
};
|
||||
FSSpec cwdSpec ;
|
||||
|
||||
@@ -1952,7 +1936,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
|
||||
pattern++;
|
||||
ret_code = FALSE;
|
||||
while ((*str!=wxT('\0'))
|
||||
&& (!(ret_code=wxMatchWild(pattern, str++, FALSE))))
|
||||
&& ((ret_code=wxMatchWild(pattern, str++, FALSE)) == 0))
|
||||
/*loop*/;
|
||||
if (ret_code) {
|
||||
while (*str != wxT('\0'))
|
||||
|
Reference in New Issue
Block a user