X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/121e1ac8b27290d0f4c4ab69c90afcfe01c38db7..095b80e2b5120d4c476a834b2017c355fa9afef0:/src/unix/utilsunx.cpp diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index ab90839e68..bf7dc8d178 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -508,7 +508,9 @@ long wxExecute(wxChar **argv, // start an xterm executing it. if ( !(flags & wxEXEC_SYNC) ) { - for ( int fd = 0; fd < FD_SETSIZE; fd++ ) + // FD_SETSIZE is unsigned under BSD, signed under other platforms + // so we need a cast to avoid warnings on all platforms + for ( int fd = 0; fd < (int)FD_SETSIZE; fd++ ) { if ( fd == pipeIn[wxPipe::Read] || fd == pipeOut[wxPipe::Write] @@ -926,7 +928,7 @@ bool wxSetEnv(const wxString& variable, const wxChar *value) s << _T('=') << value; // transform to ANSI - const char *p = s.mb_str(); + const wxWX2MBbuf p = s.mb_str(); // the string will be free()d by libc char *buf = (char *)malloc(strlen(p) + 1); @@ -934,7 +936,7 @@ bool wxSetEnv(const wxString& variable, const wxChar *value) return putenv(buf) == 0; #else // no way to set an env var - return FALSE; + return false; #endif }