[FFmpeg-cvslog] r11803 - in trunk: ffmpeg.c ffserver.c

Reimar Döffinger Reimar.Doeffinger
Sat Feb 2 09:07:05 CET 2008


Hello,
On Sat, Feb 02, 2008 at 01:54:37AM +0100, aurel wrote:
> Author: aurel
> Date: Sat Feb  2 01:54:37 2008
> New Revision: 11803
> 
> Log:
> non-const 2nd parameter for strtol/strtod
> 
> Modified:
>    trunk/ffmpeg.c
>    trunk/ffserver.c
> 
> Modified: trunk/ffmpeg.c
> ==============================================================================
> --- trunk/ffmpeg.c	(original)
> +++ trunk/ffmpeg.c	Sat Feb  2 01:54:37 2008
> @@ -2396,16 +2396,17 @@ static void opt_frame_aspect_ratio(const
>      int x = 0, y = 0;
>      double ar = 0;
>      const char *p;
> +    char *end;
>  
>      p = strchr(arg, ':');
>      if (p) {
> -        x = strtol(arg, (char **)&arg, 10);
> -        if (arg == p)
> -            y = strtol(arg+1, (char **)&arg, 10);
> +        x = strtol(arg, &end, 10);
> +        if (end == p)
> +            y = strtol(end+1, &end, 10);

While this maybe avoids a warning, I do not really like it, since the
thing that "end" points to is supposed to be constant.





More information about the ffmpeg-cvslog mailing list