From: Vadim Zeitlin Date: Sat, 6 Jun 2009 23:14:30 +0000 (+0000) Subject: fix warnings about using signed values for chars and strdup() from VC9 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3bcd8f97900ed87d9cc8e698d5475c5ad049b6f3 fix warnings about using signed values for chars and strdup() from VC9 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/sockets/baseclient.cpp b/samples/sockets/baseclient.cpp index b131981988..22fe8f1ae9 100644 --- a/samples/sockets/baseclient.cpp +++ b/samples/sockets/baseclient.cpp @@ -325,7 +325,7 @@ Client::CreateBuffer(int* msgsize) //returned buffer will contain test indicator, message size in kb and data bufsize = size*1024+2; buf = new char[bufsize]; - buf[0] = 0xDE; //second byte contains size in kilobytes + buf[0] = (char)0xDE; //second byte contains size in kilobytes buf[1] = (char)(size); *msgsize = size*1024; } @@ -334,7 +334,7 @@ Client::CreateBuffer(int* msgsize) //returned buffer will contain test indicator, message size in kb and data bufsize = (*msgsize)+2; buf = new char[bufsize]; - buf[0] = 0xBE; //second byte contains size in bytes + buf[0] = (char)0xBE; //second byte contains size in bytes buf[1] = (char)(*msgsize); } return buf; @@ -368,7 +368,7 @@ Client::StartWorker(workMode pMode) { void Client::StartWorker(workMode pMode, const wxString& pMessage) { - char* tmpbuf = strdup(pMessage.mb_str()); + char* tmpbuf = wxStrdup(pMessage.mb_str()); int msgsize = strlen(tmpbuf); char* buf = CreateBuffer(&msgsize); memset(buf+2,0x0,msgsize);