diff options
author | Andrea Weikert <elubie@gmx.net> | 2007-09-17 14:26:09 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2007-09-17 14:26:09 +0400 |
commit | 8bfbccb3292d3a6a5c182768c91ae293906f09d4 (patch) | |
tree | b72a1e3ce5f43815d8f6e7465330c0a985d35d7f /source | |
parent | 672a66905b0aca8a7099de3743d1e42059c4fc98 (diff) |
thumbs.c: warning fixes
filelist.c: warning fixes
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/imbuf/intern/thumbs.c | 7 | ||||
-rw-r--r-- | source/blender/src/filelist.c | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 944abb6968c..c2e30b091c2 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -48,6 +48,7 @@ #include <shlobj.h> /* for SHGetSpecialFolderPath, has to be done before BLI_winstuff because 'near' is disabled through BLI_windstuff */ #include "BLI_winstuff.h" #include <process.h> /* getpid */ +#include <direct.h> /* chdir */ #else #include <unistd.h> #endif @@ -64,8 +65,6 @@ static int get_thumb_dir( char* dir , ThumbSize size) { - char* home; - #ifdef WIN32 /* yes, applications shouldn't store data there, but so does GIMP :)*/ SHGetSpecialFolderPath(0, dir, CSIDL_PROFILE, 0); @@ -120,7 +119,7 @@ static const unsigned char acceptable[96] = { 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x20,0x20,0x20,0x3F,0x20 }; -static const char hex[16] = "0123456789abcdef"; +static const char hex[17] = "0123456789abcdef"; /* Note: This escape function works on file: URIs, but if you want to * escape something else, please read RFC-2396 */ @@ -180,7 +179,7 @@ static int uri_from_filename( const char *dir, const char *file, char *uri ) return 0; } /* on windows, using always uppercase drive/volume letter in uri */ - vol[0] = toupper(dir[0]); + vol[0] = (unsigned char)toupper(dir[0]); vol[1] = ':'; vol[2] = '\0'; strcat(orig_uri, vol); diff --git a/source/blender/src/filelist.c b/source/blender/src/filelist.c index fbf514ce02d..23a5e73f7cd 100644 --- a/source/blender/src/filelist.c +++ b/source/blender/src/filelist.c @@ -481,7 +481,7 @@ void BIF_filelist_loadimage(struct FileList* filelist, int index) scaledy = ( (float)imb->y/(float)imb->x )*imgwidth; } else { - scaledy = imgheight; + scaledy = (float)imgheight; scaledx = ( (float)imb->x/(float)imb->y )*imgheight; } ex = (short)scaledx; |