[MPlayer-dev-eng] serious warnings and bugs

David Holm dholm at telia.com
Mon Dec 24 00:29:47 CET 2001


Arpi wrote:

>Hi,
>
>Just compiled libmpdemux with -Wall, and got tons of bugs in form of
>warnings! just a few examples:
>
>tv.c: In function tream_open_tv':
>tv.c:107: warning: eturn' with no value, in function returning non-void
>-> such functions should return void, or return should be added/fixed
>   such things may cause random crashes (works for few people and doesn't
>  work for others - see my http bugreport for example)
>
>asf_streaming.c: In function sf_http_request':
>asf_streaming.c:414: warning: too few arguments for format
>asf_streaming.c:431: warning: too few arguments for format
>-> should be fixed ASAP to avoid crash in printf()
>
>network.c:588: warning: implicit declaration of function sf_streaming_start'
>-> it will avoid possible declaration or parameter type incompatibilites to be
>detected by gcc :(
>
>rtp.c:178: warning: passing arg 2 of ind' from incompatible pointer type
>-> should be checked, and either fixed or typecasting
>
>again: above liens are just examples, there are much more of them over the
>whole code. it's time for some review or cleanup. fixing warnings always
>solve some misterious bugs.
>
Why were warnings turned off in the first place?
There was a time when I saw warnings as stupid compiler output, I've now 
grown to low them however. The deeper you get into working with pointers 
and stuff that don't have to yield compiler errors the more fond you 
grow of those little warning messages reminding you of the small 
mistakes you've made after a day of coding. I come from a project which 
was written with portability in mind, therefore we used -Wall -pedantic 
and probably some other options which seems to want nothing but to ruin 
your day ;).

//David Holm





More information about the MPlayer-dev-eng mailing list