Fix sign warning during compilation

This commit is contained in:
mastertheknife 2013-09-15 04:13:09 +03:00
parent f0006404cc
commit c3f7af7cd1
3 changed files with 5 additions and 5 deletions

View File

@ -633,7 +633,7 @@ bool Image::WriteRaw( const char *filename ) const
bool Image::ReadJpeg( const char *filename, int p_colours, int p_subpixelorder) bool Image::ReadJpeg( const char *filename, int p_colours, int p_subpixelorder)
{ {
unsigned int new_width, new_height, new_colours, new_subpixelorder; int new_width, new_height, new_colours, new_subpixelorder;
struct jpeg_decompress_struct *cinfo = jpg_dcinfo; struct jpeg_decompress_struct *cinfo = jpg_dcinfo;
if ( !cinfo ) if ( !cinfo )
@ -886,7 +886,7 @@ bool Image::WriteJpeg( const char *filename, int quality_override ) const
bool Image::DecodeJpeg( const JOCTET *inbuffer, int inbuffer_size, int p_colours, int p_subpixelorder) bool Image::DecodeJpeg( const JOCTET *inbuffer, int inbuffer_size, int p_colours, int p_subpixelorder)
{ {
unsigned int new_width, new_height, new_colours, new_subpixelorder; int new_width, new_height, new_colours, new_subpixelorder;
struct jpeg_decompress_struct *cinfo = jpg_dcinfo; struct jpeg_decompress_struct *cinfo = jpg_dcinfo;
if ( !cinfo ) if ( !cinfo )

View File

@ -2727,7 +2727,7 @@ int Monitor::Capture()
} }
if ( true ) { if ( true ) {
if ( capture_image->Size() != camera->ImageSize() ) if ( capture_image->Size() != (int)camera->ImageSize() )
{ {
Error( "Captured image does not match expected size, check width, height and colour depth" ); Error( "Captured image does not match expected size, check width, height and colour depth" );
return( -1 ); return( -1 );

View File

@ -240,14 +240,14 @@ int main( int argc, char *argv[] )
{ {
n_bytes = read( sd, image_data+bytes_read, frame_header.image_length-bytes_read ); n_bytes = read( sd, image_data+bytes_read, frame_header.image_length-bytes_read );
if (n_bytes < 0) break; // break on error if (n_bytes < 0) break; // break on error
if (n_bytes < frame_header.image_length) if (n_bytes < (int)frame_header.image_length)
{ {
// print some informational messages // print some informational messages
if (bytes_read == 0) if (bytes_read == 0)
{ {
// Warning("Image read : Short read %d bytes of %d expected bytes",n_bytes,frame_header.image_length); // Warning("Image read : Short read %d bytes of %d expected bytes",n_bytes,frame_header.image_length);
} }
else if (bytes_read+n_bytes == frame_header.image_length) else if (bytes_read+n_bytes == (int)frame_header.image_length)
{ {
// Warning("Image read : Read rest of short read: %d bytes read total of %d bytes",n_bytes,frame_header.image_length); // Warning("Image read : Read rest of short read: %d bytes read total of %d bytes",n_bytes,frame_header.image_length);
} }