git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39477
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (type == wxPAT_PCHAR) {
// user passed a string explicitely indicated as ANSI...
if (type == wxPAT_PCHAR) {
// user passed a string explicitely indicated as ANSI...
- val = wxString(p->pad_pchar, wxConvLibc);
+ val = s = wxString(p->pad_pchar, wxConvLibc);
#if wxUSE_WCHAR_T
if (type == wxPAT_PWCHAR) {
// user passed a string explicitely indicated as Unicode...
#if wxUSE_WCHAR_T
if (type == wxPAT_PWCHAR) {
// user passed a string explicitely indicated as Unicode...
- val = wxString(p->pad_pwchar, wxConvLibc);
+ val = s = wxString(p->pad_pwchar, wxConvLibc);
if (val)
{
#if wxUSE_STRUTILS
if (val)
{
#if wxUSE_STRUTILS
- len = wxMin(max_width, wxStrlen(val));
+ // at this point we are sure that max_width is positive or null
+ // (see top of wxPrintfConvSpec::LoadArg)
+ len = wxMin((unsigned int)max_width, wxStrlen(val));
#else
for ( len = 0; val[len] && (len < max_width); len++ )
;
#else
for ( len = 0; val[len] && (len < max_width); len++ )
;
- len = wxMin(len, lenMax-lenCur);
+ // at this point we are sure that max_width is positive or null
+ // (see top of wxPrintfConvSpec::LoadArg)
+ len = wxMin((unsigned int)len, lenMax-lenCur);
wxStrncpy(buf+lenCur, val, len);
lenCur += len;
#else
wxStrncpy(buf+lenCur, val, len);
lenCur += len;
#else