[FFmpeg-devel] [PATCH] do not memset for a size of 0
Benoit Fouet
benoit.fouet
Mon Oct 12 17:20:15 CEST 2009
Hi,
the following patch fixes the linker warning:
/home/hack/ffmpeg/ffmpeg_x86/libavcodec/libavcodec.a(pcx.o): In function
`memset':
/usr/include/bits/string3.h:82: warning: memset used with constant zero
length parameter; this could be due to transposed parameters
Index: libavcodec/pcx.c
===================================================================
--- libavcodec/pcx.c (revision 20209)
+++ libavcodec/pcx.c (working copy)
@@ -71,6 +71,7 @@ static void pcx_palette(const uint8_t **
for (i=0; i<pallen; i++)
*dst++ = bytestream_get_be24(src);
+ if (256 - pallen)
memset(dst, 0, (256 - pallen) * sizeof(*dst));
}
Ben
More information about the ffmpeg-devel
mailing list