diff --git a/include/wx/defs.h b/include/wx/defs.h index 00c6427636..203e0f77eb 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -310,8 +310,10 @@ typedef short int WXTYPE; inline T wx_truncate_cast_impl(X x) { #pragma warning(push) - /* conversion from 'X' to 'T', possible loss of data */ + /* conversion from 'size_t' to 'type', possible loss of data */ #pragma warning(disable: 4267) + /* conversion from 'type1' to 'type2', possible loss of data */ + #pragma warning(disable: 4242) return x; diff --git a/include/wx/strvararg.h b/include/wx/strvararg.h index dc566e9443..6562ee3150 100644 --- a/include/wx/strvararg.h +++ b/include/wx/strvararg.h @@ -748,7 +748,7 @@ struct wxArgNormalizer : public wxArgNormalizer { wxArgNormalizer(const wxUniChar& s, const wxFormatString *fmt, unsigned index) - : wxArgNormalizer(s.GetValue(), fmt, index) {} + : wxArgNormalizer(wx_truncate_cast(wchar_t, s.GetValue()), fmt, index) {} }; // for wchar_t, default handler does the right thing diff --git a/include/wx/unichar.h b/include/wx/unichar.h index a661e5a4e2..e9726943ab 100644 --- a/include/wx/unichar.h +++ b/include/wx/unichar.h @@ -161,7 +161,7 @@ private: return ToHi8bit(c); #else - return c; + return wx_truncate_cast(char, c); #endif }