1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

fixed many warnings from GCC 4.6.1

This commit is contained in:
Vadim Pisarevsky
2012-03-17 09:22:31 +00:00
parent 4985c1b632
commit 846e37ded5
34 changed files with 84 additions and 147 deletions
+3 -3
View File
@@ -399,8 +399,7 @@ Mat imdecode( InputArray _buf, int flags )
bool imencode( const string& ext, InputArray _image,
vector<uchar>& buf, const vector<int>& params )
{
Mat temp, image = _image.getMat();
const Mat* pimage = &image;
Mat image = _image.getMat();
int channels = image.channels();
CV_Assert( channels == 1 || channels == 3 || channels == 4 );
@@ -412,8 +411,9 @@ bool imencode( const string& ext, InputArray _image,
if( !encoder->isFormatSupported(image.depth()) )
{
CV_Assert( encoder->isFormatSupported(CV_8U) );
Mat temp;
image.convertTo(temp, CV_8U);
pimage = &temp;
image = temp;
}
bool code;
-2
View File
@@ -156,7 +156,6 @@ cvImageWidgetNew (int flags)
static void
cvImageWidget_realize (GtkWidget *widget)
{
CvImageWidget *image_widget;
GdkWindowAttr attributes;
gint attributes_mask;
@@ -165,7 +164,6 @@ cvImageWidget_realize (GtkWidget *widget)
g_return_if_fail (CV_IS_IMAGE_WIDGET (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
image_widget = CV_IMAGE_WIDGET (widget);
attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y;
-1
View File
@@ -88,7 +88,6 @@ public:
{
const int img_r = 640;
const int img_c = 480;
Size frame_s = Size(img_c, img_r);
for (int k = 1; k <= 5; ++k)
{
-2
View File
@@ -230,7 +230,6 @@ void CV_HighGuiTest::VideoTest(const string& dir, int fourcc)
CvVideoWriter* writer = 0;
int counter = 0;
for(;;)
{
IplImage * img = cvQueryFrame( cap );
@@ -267,7 +266,6 @@ void CV_HighGuiTest::VideoTest(const string& dir, int fourcc)
const double thresDbell = 20;
counter = 0;
for(;;)
{
IplImage* ipl = cvQueryFrame( cap );