From: Reimar Döffinger Date: Sat, 4 Oct 2008 21:11:58 +0000 (+0000) Subject: Make size variables in dyn_buf_write unsigned so gcc will not optimize the X-Git-Tag: android-x86-4.4-r1~29898 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6bc03a695bc4c1ecd212263c4a3c9cf638d025e0;p=android-x86%2Fexternal-ffmpeg.git Make size variables in dyn_buf_write unsigned so gcc will not optimize the check away (due to assuming signed overflows do not happen). Originally committed as revision 15555 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index ac7bb8f7fd..46458db20f 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -711,7 +711,7 @@ typedef struct DynBuffer { static int dyn_buf_write(void *opaque, uint8_t *buf, int buf_size) { DynBuffer *d = opaque; - int new_size, new_allocated_size; + unsigned new_size, new_allocated_size; /* reallocate buffer if needed */ new_size = d->pos + buf_size;