From: Vadim Zeitlin Date: Thu, 12 Jul 2007 22:04:17 +0000 (+0000) Subject: use unsigned char to avoid MSVC warnings about cast truncations X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d05005c11f6c702273be30d4c306e94081df06aa use unsigned char to avoid MSVC warnings about cast truncations git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/base64.cpp b/src/common/base64.cpp index 89025b0b56..2fb58c5b29 100644 --- a/src/common/base64.cpp +++ b/src/common/base64.cpp @@ -88,7 +88,7 @@ wxBase64Decode(void *dst_, size_t dstLen, PAD }; - static const char decode[256] = + static const unsigned char decode[256] = { WSP,INV,INV,INV,INV,INV,INV,INV,INV,WSP,WSP,INV,WSP,WSP,INV,INV, INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV, @@ -118,7 +118,7 @@ wxBase64Decode(void *dst_, size_t dstLen, const char *p; for ( p = src; srcLen; p++, srcLen-- ) { - const char c = decode[(int)*p]; // cast just to suppress warnings + const unsigned char c = decode[(int)*p]; // cast to suppress warnings switch ( c ) { case WSP: