[MPlayer-dev-eng] [PATCH] bzero to memset

Guillaume Poirier poirierg at gmail.com
Sat Jan 22 23:58:50 CET 2005


Hi,


On Sat, 22 Jan 2005 22:32:10 +0100, Gianluigi Tiesi <mplayer at netfarm.it> wrote:
> On Sat, Jan 22, 2005 at 02:36:30PM +0100, Guillaume POIRIER wrote:
> > Le samedi 22 janvier 2005 à 03:43 +0100, Gianluigi Tiesi a écrit :
> > > Updated patch for new cvs...
> >
> > Tested on Linux i386 with gcc-3.4 and gcc-4.0. No more problems than
> > before: 3.4 compiles it fine, but 4.0 spits its hatred on
> > libmpcodecs/native/RTjpegN.c ... so if you're willing to test and fix
> > it, I guess you're welcome to do so.
> >
> > Other than that it works.
> >
> > Regards,
> >
> > Guillaume
> > 
> - bzero(RTjpeg_old, ((4*RTjpeg_width*RTjpeg_height)));
> + memset(RTjpeg_old, 0, ((4*RTjpeg_width*RTjpeg_height)));
> 
> Except the fact I don't understand the parentesis, the only problem
> can have gcc is the result is not assignable to a size_t,
> 
> you can try:
> memset(RTjpeg_old, 0, (size_t) ((4*RTjpeg_width*RTjpeg_height)));
> 
> anyway what gcc-4 says about it?

Here's what it says:

/home/guillaume/Programmes/local/bin/gcc -c -I../libvo -I../../libvo
-I/usr/X11R6/include -fno-PIC -O4 -march=athlon-xp -mtune=athlon-xp
-pipe -ffast-math -fomit-frame-pointer -D_REENTRANT
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I. -Inative -I..
-I../libmpdemux -I../loader   -D_GNU_SOURCE -o native/RTjpegN.o
native/RTjpegN.c
native/RTjpegN.c: In function 'RTjpeg_compressYUV420':
native/RTjpegN.c:2862: warning: pointer targets in initialization
differ in signedness
native/RTjpegN.c:2863: warning: pointer targets in initialization
differ in signedness
native/RTjpegN.c:2884: warning: pointer targets in passing argument 1
of 'RTjpeg_dctY' differ in signedness
native/RTjpegN.c:2888: warning: pointer targets in passing argument 1
of 'RTjpeg_dctY' differ in signedness
native/RTjpegN.c:2892: warning: pointer targets in passing argument 1
of 'RTjpeg_dctY' differ in signedness
native/RTjpegN.c:2896: warning: pointer targets in passing argument 1
of 'RTjpeg_dctY' differ in signedness
native/RTjpegN.c: In function 'RTjpeg_compressYUV422':
native/RTjpegN.c:2916: warning: pointer targets in initialization
differ in signedness
native/RTjpegN.c:2937: warning: pointer targets in passing argument 1
of 'RTjpeg_dctY' differ in signedness
native/RTjpegN.c:2941: warning: pointer targets in passing argument 1
of 'RTjpeg_dctY' differ in signedness
native/RTjpegN.c: In function 'RTjpeg_decompressYUV422':
native/RTjpegN.c:2987: warning: pointer targets in initialization
differ in signedness
native/RTjpegN.c:3015: warning: pointer targets in passing argument 1
of 'RTjpeg_idct' differ in signedness
native/RTjpegN.c:3021: warning: pointer targets in passing argument 1
of 'RTjpeg_idct' differ in signedness
native/RTjpegN.c: In function 'RTjpeg_decompressYUV420':
native/RTjpegN.c:3035: warning: pointer targets in initialization
differ in signedness
native/RTjpegN.c:3036: warning: pointer targets in initialization
differ in signedness
native/RTjpegN.c:3064: warning: pointer targets in passing argument 1
of 'RTjpeg_idct' differ in signedness
native/RTjpegN.c:3070: warning: pointer targets in passing argument 1
of 'RTjpeg_idct' differ in signedness
native/RTjpegN.c:3076: warning: pointer targets in passing argument 1
of 'RTjpeg_idct' differ in signedness
native/RTjpegN.c:3082: warning: pointer targets in passing argument 1
of 'RTjpeg_idct' differ in signedness
native/RTjpegN.c: In function 'RTjpeg_mcompressYUV420':
native/RTjpegN.c:3216: warning: pointer targets in initialization
differ in signedness
native/RTjpegN.c:3217: warning: pointer targets in initialization
differ in signedness
native/RTjpegN.c:3255: warning: pointer targets in passing argument 1
of 'RTjpeg_dctY' differ in signedness
native/RTjpegN.c:3264: warning: pointer targets in passing argument 1
of 'RTjpeg_dctY' differ in signedness
native/RTjpegN.c:3273: warning: pointer targets in passing argument 1
of 'RTjpeg_dctY' differ in signedness
native/RTjpegN.c:3282: warning: pointer targets in passing argument 1
of 'RTjpeg_dctY' differ in signedness
native/RTjpegN.c: In function 'RTjpeg_mcompressYUV422':
native/RTjpegN.c:3322: warning: pointer targets in assignment differ
in signedness
native/RTjpegN.c:3350: warning: pointer targets in passing argument 1
of 'RTjpeg_dctY' differ in signedness
native/RTjpegN.c:3359: warning: pointer targets in passing argument 1
of 'RTjpeg_dctY' differ in signedness
{standard input}: Assembler messages:
{standard input}:1008: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1014: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1016: Error: suffix or operands invalid for `movq'
{standard input}:1018: Error: suffix or operands invalid for `movq'
{standard input}:1036: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1042: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1048: Error: suffix or operands invalid for `punpckhwd'
{standard input}:1050: Error: suffix or operands invalid for `punpckhwd'
{standard input}:1058: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1060: Error: suffix or operands invalid for `punpckhwd'
{standard input}:1067: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1071: Error: suffix or operands invalid for `punpckhwd'
{standard input}:1088: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1094: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1096: Error: suffix or operands invalid for `movq'
{standard input}:1098: Error: suffix or operands invalid for `movq'
{standard input}:1106: Error: suffix or operands invalid for `psubw'
{standard input}:1108: Error: suffix or operands invalid for `paddw'
{standard input}:1114: Error: suffix or operands invalid for `paddw'
{standard input}:1116: Error: suffix or operands invalid for `psubw'
{standard input}:1126: Error: suffix or operands invalid for `paddw'
{standard input}:1132: Error: suffix or operands invalid for `paddw'
{standard input}:1134: Error: suffix or operands invalid for `psubw'
{standard input}:1140: Error: suffix or operands invalid for `psubw'
{standard input}:1194: Error: suffix or operands invalid for `paddw'
{standard input}:1197: Error: suffix or operands invalid for `psubw'
{standard input}:1203: Error: suffix or operands invalid for `paddw'
{standard input}:1206: Error: suffix or operands invalid for `psubw'
{standard input}:1211: Error: suffix or operands invalid for `paddw'
{standard input}:1218: Error: suffix or operands invalid for `paddw'
{standard input}:1221: Error: suffix or operands invalid for `psubw'
{standard input}:1224: Error: suffix or operands invalid for `psubw'
{standard input}:1292: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1298: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1304: Error: suffix or operands invalid for `punpckhwd'
{standard input}:1306: Error: suffix or operands invalid for `punpckhwd'
{standard input}:1314: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1316: Error: suffix or operands invalid for `punpckhwd'
{standard input}:1323: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1327: Error: suffix or operands invalid for `punpckhwd'
{standard input}:1344: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1350: Error: suffix or operands invalid for `punpcklwd'
{standard input}:1352: Error: suffix or operands invalid for `movq'
{standard input}:1354: Error: suffix or operands invalid for `movq'
{standard input}:1362: Error: suffix or operands invalid for `psubw'
{standard input}:1364: Error: suffix or operands invalid for `paddw'
{standard input}:1370: Error: suffix or operands invalid for `paddw'
{standard input}:1372: Error: suffix or operands invalid for `psubw'
{standard input}:1382: Error: suffix or operands invalid for `paddw'
{standard input}:1388: Error: suffix or operands invalid for `paddw'
{standard input}:1390: Error: suffix or operands invalid for `psubw'
{standard input}:1396: Error: suffix or operands invalid for `psubw'
{standard input}:1450: Error: suffix or operands invalid for `paddw'
{standard input}:1453: Error: suffix or operands invalid for `psubw'
{standard input}:1459: Error: suffix or operands invalid for `paddw'
{standard input}:1462: Error: suffix or operands invalid for `psubw'
{standard input}:1467: Error: suffix or operands invalid for `paddw'
{standard input}:1474: Error: suffix or operands invalid for `paddw'
{standard input}:1477: Error: suffix or operands invalid for `psubw'
{standard input}:1480: Error: suffix or operands invalid for `psubw'
{standard input}:1667: Error: suffix or operands invalid for `movq'
{standard input}:1678: Error: suffix or operands invalid for `movq'
{standard input}:1684: Error: suffix or operands invalid for `movq'
{standard input}:1692: Error: suffix or operands invalid for `paddw'
{standard input}:1694: Error: suffix or operands invalid for `paddw'
{standard input}:1695: Error: suffix or operands invalid for `psubw'
{standard input}:1697: Error: suffix or operands invalid for `psubw'
{standard input}:1732: Error: suffix or operands invalid for `paddw'
{standard input}:1733: Error: suffix or operands invalid for `psubw'
{standard input}:1797: Error: suffix or operands invalid for `movq'
{standard input}:1808: Error: suffix or operands invalid for `movq'
{standard input}:1814: Error: suffix or operands invalid for `movq'
{standard input}:1822: Error: suffix or operands invalid for `paddw'
{standard input}:1824: Error: suffix or operands invalid for `paddw'
{standard input}:1825: Error: suffix or operands invalid for `psubw'
{standard input}:1827: Error: suffix or operands invalid for `psubw'
{standard input}:1847: Error: suffix or operands invalid for `movq'
{standard input}:1860: Error: suffix or operands invalid for `paddw'
{standard input}:1861: Error: suffix or operands invalid for `psubw'
{standard input}:1879: Error: suffix or operands invalid for `movq'
{standard input}:1896: Error: suffix or operands invalid for `movq'
{standard input}:1912: Error: suffix or operands invalid for `movq'
{standard input}:1958: Error: suffix or operands invalid for `movq'
{standard input}:1960: Error: suffix or operands invalid for `movq'
{standard input}:1992: Error: suffix or operands invalid for `movq'
{standard input}:2044: Error: suffix or operands invalid for `movq'
{standard input}:2176: Error: suffix or operands invalid for `movq'
{standard input}:2186: Error: suffix or operands invalid for `movq'
{standard input}:2258: Error: suffix or operands invalid for `movq'
{standard input}:2266: Error: suffix or operands invalid for `movq'
make: *** [native/RTjpegN.o] Erreur 1




More information about the MPlayer-dev-eng mailing list