From c3f7af7cd1b53821ee9de1b044d3597cb9b6dd51 Mon Sep 17 00:00:00 2001 From: mastertheknife Date: Sun, 15 Sep 2013 04:13:09 +0300 Subject: [PATCH] Fix sign warning during compilation --- src/zm_image.cpp | 4 ++-- src/zm_monitor.cpp | 2 +- src/zmf.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index 0464e6c25..6a301f165 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -633,7 +633,7 @@ bool Image::WriteRaw( const char *filename ) const 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; 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) { - 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; if ( !cinfo ) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 463cf2b07..79d96e234 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2727,7 +2727,7 @@ int Monitor::Capture() } 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" ); return( -1 ); diff --git a/src/zmf.cpp b/src/zmf.cpp index 60c00967e..b37285122 100644 --- a/src/zmf.cpp +++ b/src/zmf.cpp @@ -240,14 +240,14 @@ int main( int argc, char *argv[] ) { 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 < frame_header.image_length) + if (n_bytes < (int)frame_header.image_length) { // print some informational messages if (bytes_read == 0) { // 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); }