[FFmpeg-devel] [PATCH] Make small_strptime() return char*
Stefano Sabatini
stefano.sabatini-lala
Sat Jan 3 20:36:03 CET 2009
Hi,
strptime() has as signature:
char *strptime(const char *p, const char *fmt, struct tm *dt);
while we have:
const char *small_strptime(const char *p, const char *fmt, struct tm*dt);
Patch changes the constness of the returned signature to make it more
similar to the standard one, this also fixes a warning in
libavformat/utils.c:
utils.c: In function ?parse_date?:
utils.c:2948: warning: cast discards qualifiers from pointer target type
which occurrs in the code:
dt.tm_sec = strtol(p, (char **)&q, 10);
(q is a const char*, so we're passing to strtol a const char**).
The patch shoudn't break API / ABI, so a micro version bump should be sufficient.
Regards.
--
FFmpeg = Forgiving & Funny Multipurpose Pacific Explosive God
-------------- next part --------------
A non-text attachment was scrubbed...
Name: change-const-to-small-strptime.patch
Type: text/x-diff
Size: 1014 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090103/42708286/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-parse-date-warn.patch
Type: text/x-diff
Size: 408 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090103/42708286/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reindent-small-strptime.patch
Type: text/x-diff
Size: 1102 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090103/42708286/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-senseless-cast.patch
Type: text/x-diff
Size: 578 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090103/42708286/attachment-0003.patch>
More information about the ffmpeg-devel
mailing list