From 6bc03a695bc4c1ecd212263c4a3c9cf638d025e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Sat, 4 Oct 2008 21:11:58 +0000 Subject: [PATCH] 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 --- libavformat/aviobuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;