From 8125ef03347b9a1d25bf53d631246597827e7bfc Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Oct 2015 09:49:09 -0400 Subject: [PATCH] change types and move things around to remove compile warnings --- src/zm_image.cpp | 2 +- src/zm_image.h | 2 +- src/zm_monitor.cpp | 8 ++------ src/zm_monitor.h | 8 +++++--- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index d9cf1ded8..a302b4be5 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -1789,7 +1789,7 @@ void Image::MaskPrivacy( const unsigned char *p_bitmask, const Rgb pixel_colour } /* RGB32 compatible: complete */ -void Image::Annotate( const char *p_text, const Coord &coord, const int size, const Rgb fg_colour, const Rgb bg_colour ) +void Image::Annotate( const char *p_text, const Coord &coord, const unsigned int size, const Rgb fg_colour, const Rgb bg_colour ) { strncpy( text, p_text, sizeof(text) ); diff --git a/src/zm_image.h b/src/zm_image.h index eb320bcdd..016a64a3c 100644 --- a/src/zm_image.h +++ b/src/zm_image.h @@ -232,7 +232,7 @@ public: const Coord centreCoord( const char *text ) const; void MaskPrivacy( const unsigned char *p_bitmask, const Rgb pixel_colour=0x00222222 ); - void Annotate( const char *p_text, const Coord &coord, const int size=1, const Rgb fg_colour=RGB_WHITE, const Rgb bg_colour=RGB_BLACK ); + void Annotate( const char *p_text, const Coord &coord, const unsigned int size=1, const Rgb fg_colour=RGB_WHITE, const Rgb bg_colour=RGB_BLACK ); Image *HighlightEdges( Rgb colour, unsigned int p_colours, unsigned int p_subpixelorder, const Box *limits=0 ); //Image *HighlightEdges( Rgb colour, const Polygon &polygon ); void Timestamp( const char *label, const time_t when, const Coord &coord, const int size ); diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 699e6dc83..ca14b5373 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2084,15 +2084,13 @@ int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose const char *device = dbrow[col]; col++; int channel = atoi(dbrow[col]); col++; int format = atoi(dbrow[col]); col++; - bool v4l_multi_buffer; + bool v4l_multi_buffer = config.v4l_multi_buffer; if ( dbrow[col] ) { if (*dbrow[col] == '0' ) { v4l_multi_buffer = false; } else if ( *dbrow[col] == '1' ) { v4l_multi_buffer = true; } - } else { - v4l_multi_buffer = config.v4l_multi_buffer; } col++; @@ -2742,15 +2740,13 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose ) int channel = atoi(dbrow[col]); col++; int format = atoi(dbrow[col]); col++; - bool v4l_multi_buffer; + bool v4l_multi_buffer = config.v4l_multi_buffer; if ( dbrow[col] ) { if (*dbrow[col] == '0' ) { v4l_multi_buffer = false; } else if ( *dbrow[col] == '1' ) { v4l_multi_buffer = true; } - } else { - v4l_multi_buffer = config.v4l_multi_buffer; } col++; diff --git a/src/zm_monitor.h b/src/zm_monitor.h index d4f9b7926..0e357ba7d 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -168,7 +168,7 @@ protected: #else // ZM_MEM_MAPPED int shm_id; #endif // ZM_MEM_MAPPED - unsigned long mem_size; + off_t mem_size; unsigned char *mem_ptr; volatile SharedData *shared_data; @@ -278,7 +278,7 @@ protected: #else // ZM_MEM_MAPPED int shm_id; #endif // ZM_MEM_MAPPED - unsigned long mem_size; + off_t mem_size; unsigned char *mem_ptr; SharedData *shared_data; @@ -294,11 +294,13 @@ protected: int n_zones; Zone **zones; - const unsigned char *privacy_bitmask; struct timeval **timestamps; Image **images; + const unsigned char *privacy_bitmask; + + int iDoNativeMotDet; int n_linked_monitors;