Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wilkins <Jason.A.Wilkins@gmail.com>2012-04-09 05:16:19 +0400
committerJason Wilkins <Jason.A.Wilkins@gmail.com>2012-04-09 05:16:19 +0400
commitdabcdc15325702586501b5a6e401876f776d3c4c (patch)
tree7ecbd10dbe5b3ef905dcb5e4fd632a451605add8 /source/blender
parent35b483671188ca4bd418c3206809379aff179082 (diff)
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.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/avi/intern/avi.c7
-rw-r--r--source/blender/blenlib/intern/path_util.c1
-rw-r--r--source/blender/blenlib/intern/winstuff.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c4
4 files changed, 7 insertions, 7 deletions
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);
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index df711150b97..3c59ca8d52b 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -831,7 +831,6 @@ const char *BLI_getDefaultDocumentFolder(void)
return getenv("HOME");
#else /* Windows */
- const char * ret;
static char documentfolder[MAXPATHLEN];
HRESULT hResult;
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index d2c98b7aaf3..3dd2cc4c95d 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -217,8 +217,6 @@ static wchar_t * BLI_alloc_utf16_from_8(char * in8, size_t add)
struct dirent *readdir(DIR *dp) {
- char * FileName;
- size_t size;
if (dp->direntry.d_name) {
MEM_freeN(dp->direntry.d_name);
dp->direntry.d_name= NULL;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 737a182bbe0..540dc092297 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5706,8 +5706,8 @@ static void view3d_split_250(View3D *v3d, ListBase *regions)
RegionView3D *rv3d;
rv3d= ar->regiondata= MEM_callocN(sizeof(RegionView3D), "region v3d patch");
- rv3d->persp= v3d->persp;
- rv3d->view= v3d->view;
+ rv3d->persp= (char)v3d->persp;
+ rv3d->view= (char)v3d->view;
rv3d->dist= v3d->dist;
copy_v3_v3(rv3d->ofs, v3d->ofs);
copy_qt_qt(rv3d->viewquat, v3d->viewquat);