[FFmpeg-devel] [PATCH] Fix ffserver.c putenv gcc warning

Måns Rullgård mans
Fri May 30 18:21:34 CEST 2008


Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:

> Hi all,
>
> putenv expects a char* when we feed it with a const char*, this fixes
> the resulting warning:
> ffserver.c: In function ?main?:
> ffserver.c:4388: warning: passing argument 1 of ?putenv? discards qualifiers from pointer target type
>
> Regards. 
> -- 
> FFmpeg = Foolish and Funny MultiPurpose ExchanGer
>
> Index: ffserver.c
> ===================================================================
> --- ffserver.c	(revision 13552)
> +++ ffserver.c	(working copy)
> @@ -4385,7 +4385,7 @@
>  
>      parse_options(argc, argv, options, NULL);
>  
> -    putenv("http_proxy");               /* Kill the http_proxy */
> +    putenv(av_strdup("http_proxy"));    /* Kill the http_proxy */

Beautiful memory leak.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list