fixed multiple warnings from VS2010.

This commit is contained in:
Vadim Pisarevsky
2010-11-25 16:55:46 +00:00
parent 7e5c11a920
commit 1286c1db45
36 changed files with 178 additions and 177 deletions

View File

@@ -108,7 +108,7 @@ skip_input_data(j_decompress_ptr cinfo, long num_bytes)
{
// We need to skip more data than we have in the buffer.
// This will force the JPEG library to suspend decoding.
source->skip = num_bytes - source->pub.bytes_in_buffer;
source->skip = (int)(num_bytes - source->pub.bytes_in_buffer);
source->pub.next_input_byte += source->pub.bytes_in_buffer;
source->pub.bytes_in_buffer = 0;
}

View File

@@ -116,7 +116,7 @@ bool TiffDecoder::readHeader()
if( tif )
{
int width = 0, height = 0, photometric = 0, compression = 0;
int width = 0, height = 0, photometric = 0;
m_tif = tif;
if( TIFFRGBAImageOK( tif, errmsg ) &&
@@ -226,9 +226,9 @@ bool TiffDecoder::readData( Mat& img )
else
{
if( !is_tiled )
ok = TIFFReadEncodedStrip( tif, tileidx, (uint32*)buffer, -1 );
ok = (int)TIFFReadEncodedStrip( tif, tileidx, (uint32*)buffer, (tsize_t)-1 ) >= 0;
else
ok = TIFFReadEncodedTile( tif, tileidx, (uint32*)buffer, -1 );
ok = (int)TIFFReadEncodedTile( tif, tileidx, (uint32*)buffer, (tsize_t)-1 ) >= 0;
if( !ok )
{

View File

@@ -164,7 +164,7 @@ void icvCvt_BGRA2BGR_16u_C4C3R( const ushort* bgra, int bgra_step,
{
for( i = 0; i < size.width; i++, bgr += 3, bgra += 4 )
{
uchar t0 = bgra[swap_rb], t1 = bgra[1];
ushort t0 = bgra[swap_rb], t1 = bgra[1];
bgr[0] = t0; bgr[1] = t1;
t0 = bgra[swap_rb^2]; bgr[2] = t0;
}