diff --git a/dlib/opencv/cv_image.h b/dlib/opencv/cv_image.h index 445b70557..9543b1efc 100644 --- a/dlib/opencv/cv_image.h +++ b/dlib/opencv/cv_image.h @@ -84,7 +84,11 @@ namespace dlib private: - inline void check_image_type (const IplImage* img) const + inline void check_image_type (const IplImage* +#ifdef ENABLE_ASSERTS + img // the #ifdef is here to avoid an unused warning argument from the compiler +#endif + ) const { DLIB_ASSERT( img->dataOrder == 0, "Only interleaved color channels are supported with cv_image"); DLIB_ASSERT((img->depth&0xFF)/8*img->nChannels == sizeof(pixel_type),