r6376 - trunk/libavformat/mov.c
Author: bcoudurier Date: Fri Sep 29 12:28:11 2006 New Revision: 6376 Modified: trunk/libavformat/mov.c Log: remove gcc warnings about void * used in arithmetic Modified: trunk/libavformat/mov.c ============================================================================== --- trunk/libavformat/mov.c (original) +++ trunk/libavformat/mov.c Fri Sep 29 12:28:11 2006 @@ -649,7 +649,7 @@ if (st->codec->extradata) { strcpy(st->codec->extradata, "SVQ3"); // fake - get_buffer(pb, st->codec->extradata + 0x5a, atom.size); + get_buffer(pb, (uint8_t *)st->codec->extradata + 0x5a, atom.size); dprintf("Reading SMI %"PRId64" %s\n", atom.size, (char*)st->codec->extradata + 0x5a); } else url_fskip(pb, atom.size); @@ -689,8 +689,8 @@ st->codec->extradata = (uint8_t*) av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); if (st->codec->extradata) { - strcpy(st->codec->extradata + 4, "alac"); // fake - get_buffer(pb, st->codec->extradata + 8, 36 - 8); + strcpy((char *)st->codec->extradata + 4, "alac"); // fake + get_buffer(pb, (uint8_t *)st->codec->extradata + 8, 36 - 8); dprintf("Reading alac %d %s\n", st->codec->extradata_size, (char*)st->codec->extradata); } else url_fskip(pb, atom.size); @@ -735,8 +735,8 @@ /* pass all jp2h atom to codec */ if (st->codec->extradata) { - strcpy(st->codec->extradata + 4, "jp2h"); - get_buffer(pb, st->codec->extradata + 8, atom.size); + strcpy((char *)st->codec->extradata + 4, "jp2h"); + get_buffer(pb, (uint8_t *)st->codec->extradata + 8, atom.size); } else url_fskip(pb, atom.size); return 0;
bcoudurier said:
Author: bcoudurier Date: Fri Sep 29 12:28:11 2006 New Revision: 6376
Modified: trunk/libavformat/mov.c
Log: remove gcc warnings about void * used in arithmetic
BTW, these are not just silly gcc warnings. Arithmetic on void* is not allowed by C99. -- M?ns Rullg?rd mru at inprovide.com
Hi M?ns Rullg?rd wrote:
bcoudurier said:
Author: bcoudurier Date: Fri Sep 29 12:28:11 2006 New Revision: 6376
Modified: trunk/libavformat/mov.c
Log: remove gcc warnings about void * used in arithmetic
BTW, these are not just silly gcc warnings. Arithmetic on void* is not allowed by C99.
Thanks for the info. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
On Fri, Sep 29, 2006 at 11:39:10AM +0100, M?ns Rullg?rd wrote:
bcoudurier said:
Author: bcoudurier Date: Fri Sep 29 12:28:11 2006 New Revision: 6376
Modified: trunk/libavformat/mov.c
Log: remove gcc warnings about void * used in arithmetic
BTW, these are not just silly gcc warnings. Arithmetic on void* is not allowed by C99.
Or by any version of the C standard. Rich
Hi On Fri, Sep 29, 2006 at 12:28:12PM +0200, bcoudurier wrote:
Author: bcoudurier Date: Fri Sep 29 12:28:11 2006 New Revision: 6376
Modified: trunk/libavformat/mov.c
Log: remove gcc warnings about void * used in arithmetic
i thought extradata was uint8_t, it definitly should be, adding casts everywhere is not ok, please rather change AVCodecContext.extadata to uint8_t* [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In the past you could go to a library and read, borrow or copy any book Today you'd get arrested for mere telling someone where the library is
Hi Michael Niedermayer wrote:
Hi
On Fri, Sep 29, 2006 at 12:28:12PM +0200, bcoudurier wrote:
Author: bcoudurier Date: Fri Sep 29 12:28:11 2006 New Revision: 6376
Modified: trunk/libavformat/mov.c
Log: remove gcc warnings about void * used in arithmetic
i thought extradata was uint8_t, it definitly should be, adding casts everywhere is not ok, please rather change AVCodecContext.extadata to uint8_t*
[...]
Done. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
participants (5)
-
baptiste.coudurier@smartjog.com -
dalias@aerifal.cx -
michaelni@gmx.at -
mru@inprovide.com -
subversion@mplayerhq.hu