From dabcdc15325702586501b5a6e401876f776d3c4c Mon Sep 17 00:00:00 2001 From: Jason Wilkins Date: Mon, 9 Apr 2012 01:16:19 +0000 Subject: Warning Fixes - const correctness in unicode encoding, unused variables in blenlib, and some type conversions This is from a patch that is in the tracker, but it leaves out a fix of BLI_gzopen which needs more work. --- source/blender/avi/intern/avi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/blender/avi') diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c index dff22867d81..0658317a0bd 100644 --- a/source/blender/avi/intern/avi.c +++ b/source/blender/avi/intern/avi.c @@ -741,6 +741,7 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...) int i; int64_t header_pos1, header_pos2; int64_t stream_pos1, stream_pos2; + int64_t junk_pos; movie->type = AVI_MOVIE_WRITE; movie->fp = fopen (name, "wb"); @@ -899,9 +900,11 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...) fseek (movie->fp, stream_pos2, SEEK_SET); } - if (ftell(movie->fp) < 2024 - 8) { + junk_pos= ftell(movie->fp); + + if (junk_pos < 2024 - 8) { chunk.fcc = FCC("JUNK"); - chunk.size = 2024-8-ftell(movie->fp); + chunk.size = 2024 - 8 - (int)junk_pos; awrite (movie, &chunk, 1, sizeof(AviChunk), movie->fp, AVI_CHUNK); -- cgit v1.2.3