[FFmpeg-cvslog] r11803 - in trunk: ffmpeg.c ffserver.c
Michael Niedermayer
michaelni
Sat Feb 2 23:41:56 CET 2008
On Sat, Feb 02, 2008 at 09:07:05AM +0100, Reimar D?ffinger wrote:
> 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.
How do you suggest to fix it?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20080202/c8247212/attachment.pgp>
More information about the ffmpeg-cvslog
mailing list