[FFmpeg-devel] Invalid comparison of enum RTSPStatusCode in macro

Reynaldo H. Verdejo Pinochet r.verdejo at sisa.samsung.com
Tue Apr 8 23:03:01 CEST 2014


Hello

On 04/08/2014 07:09 AM, anshul wrote:
> Hi
>
> While converting error code to string, we compare for error_code >= 0,
> since many system define enum as unsigned integer so this condition does
> not make any sense.
> every thing is going to be greater than 0.
>

Not really. You can pass anything to a macro. This been said
though, the condition is indeed superfluous and even produces a
warning at least with gcc 4.7 and -Wtype-limits (4.8 seems
not to be disturbed by it) on the condition always been true
for the macro invocation in ffserver.c. This was spoted yesterday
by Michael but I decided I will wait till adding API for getting
the error msg to wipe the macro and be done with it.

I'm applying your patch all the same. Commit message fixed though.

Thanks for spotting and acting on this issue. Appreciated.

Bests,


-- 
Reynaldo H. Verdejo Pinochet
Sr. Multimedia Engineer, Open Source Group
Samsung Research America - Silicon Valley


More information about the ffmpeg-devel mailing list