Warning fixes for BCC, VC, OW and MinGW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
812a5849e5
commit
38d4b1e4bc
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: image.cpp
|
||||
// Name: src/common/image.cpp
|
||||
// Purpose: wxImage
|
||||
// Author: Robert Roebling
|
||||
// RCS-ID: $Id$
|
||||
@ -1778,7 +1778,7 @@ wxImage::HSVValue wxImage::RGBtoHSV(const RGBValue& rgb)
|
||||
|
||||
const double value = maximumRGB;
|
||||
|
||||
double hue, saturation;
|
||||
double hue = 0.0, saturation;
|
||||
const double deltaRGB = maximumRGB - minimumRGB;
|
||||
if ( wxIsNullDouble(deltaRGB) )
|
||||
{
|
||||
@ -1801,6 +1801,10 @@ wxImage::HSVValue wxImage::RGBtoHSV(const RGBValue& rgb)
|
||||
case BLUE:
|
||||
hue = 4.0 + (red - green) / deltaRGB;
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG(wxT("hue not specified"));
|
||||
break;
|
||||
}
|
||||
|
||||
hue /= 6.0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: imagtiff.cpp
|
||||
// Name: src/common/imagtiff.cpp
|
||||
// Purpose: wxImage TIFF handler
|
||||
// Author: Robert Roebling
|
||||
// RCS-ID: $Id$
|
||||
@ -53,7 +53,7 @@ static toff_t wxFileOffsetToTIFF(wxFileOffset ofs)
|
||||
return (toff_t)-1;
|
||||
|
||||
toff_t tofs = wx_truncate_cast(toff_t, ofs);
|
||||
wxCHECK_MSG( tofs == ofs, (toff_t)-1,
|
||||
wxCHECK_MSG( (wxFileOffset)tofs == ofs, (toff_t)-1,
|
||||
_T("TIFF library doesn't support large files") );
|
||||
|
||||
return tofs;
|
||||
@ -445,7 +445,7 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
|
||||
if ( ptr[column*24 + bp*3] > 0 )
|
||||
{
|
||||
// check only red as this is sufficient
|
||||
reverse = reverse | 128 >> bp;
|
||||
reverse = (uint8)(reverse | 128 >> bp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -491,4 +491,3 @@ bool wxTIFFHandler::DoCanRead( wxInputStream& stream )
|
||||
#endif // wxUSE_STREAMS
|
||||
|
||||
#endif // wxUSE_LIBTIFF
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: strconv.cpp
|
||||
// Name: src/common/strconv.cpp
|
||||
// Purpose: Unicode conversion classes
|
||||
// Author: Ove Kaaven, Robert Roebling, Vadim Zeitlin, Vaclav Slavik,
|
||||
// Ryan Norton, Fredrik Roubert (UTF7)
|
||||
@ -653,7 +653,7 @@ size_t wxMBConvUTF8::MB2WC(wchar_t *buf, const char *psz, size_t n) const
|
||||
}
|
||||
#else // !WC_UTF16
|
||||
if (buf)
|
||||
*buf++ = res;
|
||||
*buf++ = (wchar_t)res;
|
||||
len++;
|
||||
#endif // WC_UTF16/!WC_UTF16
|
||||
}
|
||||
@ -674,7 +674,7 @@ size_t wxMBConvUTF8::MB2WC(wchar_t *buf, const char *psz, size_t n) const
|
||||
len += pa;
|
||||
#else
|
||||
if (buf)
|
||||
*buf++ = wxUnicodePUA + (unsigned char)*opsz;
|
||||
*buf++ = (wchar_t)(wxUnicodePUA + (unsigned char)*opsz);
|
||||
opsz++;
|
||||
len++;
|
||||
#endif
|
||||
@ -902,7 +902,7 @@ size_t wxMBConvUTF16straight::MB2WC(wchar_t *buf, const char *psz, size_t n) con
|
||||
return pa;
|
||||
|
||||
if (buf)
|
||||
*buf++ = cc;
|
||||
*buf++ = (wchar_t)cc;
|
||||
len++;
|
||||
psz += pa * sizeof(wxUint16);
|
||||
}
|
||||
@ -962,7 +962,7 @@ size_t wxMBConvUTF16swap::MB2WC(wchar_t *buf, const char *psz, size_t n) const
|
||||
return pa;
|
||||
|
||||
if (buf)
|
||||
*buf++ = cc;
|
||||
*buf++ = (wchar_t)cc;
|
||||
|
||||
len++;
|
||||
psz += pa * sizeof(wxUint16);
|
||||
@ -1163,7 +1163,7 @@ size_t wxMBConvUTF32straight::MB2WC(wchar_t *buf, const char *psz, size_t n) con
|
||||
while (*(wxUint32*)psz && (!buf || len < n))
|
||||
{
|
||||
if (buf)
|
||||
*buf++ = *(wxUint32*)psz;
|
||||
*buf++ = (wchar_t)(*(wxUint32*)psz);
|
||||
len++;
|
||||
psz += sizeof(wxUint32);
|
||||
}
|
||||
@ -2845,5 +2845,3 @@ WXDLLIMPEXP_DATA_BASE(wxMBConv) wxConvLibc,
|
||||
wxConvUTF8;
|
||||
|
||||
#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user