A simple question about compiler warning
Posted: Mon Aug 23, 2010 2:51 am
Hello all (again)!
I have compiled ZM, and get this warning:
and this is the code at line 779:
I am concerned about this, because I read the implications, and the results can not be as espected.
Here is a FAQ about this issue, but I don't know how to modify this, because I don't know what reach with it.
http://c-faq.com/expr/evalorder2.html
Another piece of warning is:
The function is:
As you can see the argument "frame_rate" is declared as double, but within the function, the following expresion is used:
I was fixed changing to:
Is this correct?
Thank you
I have compiled ZM, and get this warning:
Code: Select all
zm_image.cpp: In member function 'void Image::Blend(const Image&, int) const':
zm_image.cpp:779: warning: operation on 'pdest' may be undefined
Code: Select all
*pdest++ = (*blend_ptr)[*pdest][*psrc++];
Here is a FAQ about this issue, but I don't know how to modify this, because I don't know what reach with it.
http://c-faq.com/expr/evalorder2.html
Another piece of warning is:
Code: Select all
zm_mpeg.cpp: In member function 'void VideoStream::SetupCodec(int, int, int, int, double)':
zm_mpeg.cpp:108: warning: converting to 'int' from 'double'
Code: Select all
void VideoStream::SetupCodec( int colours, int width, int height, int bitrate, double frame_rate )
Code: Select all
c->time_base.den = frame_rate;
Code: Select all
c->time_base.den = (int)(frame_rate);
Thank you