[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12057] trunk/blender/source/blender: thumbs.c: warning fixes
Andrea Weikert
elubie at gmx.net
Mon Sep 17 12:26:09 CEST 2007
Revision: 12057
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12057
Author: elubie
Date: 2007-09-17 12:26:09 +0200 (Mon, 17 Sep 2007)
Log Message:
-----------
thumbs.c: warning fixes
filelist.c: warning fixes
Modified Paths:
--------------
trunk/blender/source/blender/imbuf/intern/thumbs.c
trunk/blender/source/blender/src/filelist.c
Modified: trunk/blender/source/blender/imbuf/intern/thumbs.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/thumbs.c 2007-09-17 06:11:06 UTC (rev 12056)
+++ trunk/blender/source/blender/imbuf/intern/thumbs.c 2007-09-17 10:26:09 UTC (rev 12057)
@@ -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 @@
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 @@
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);
Modified: trunk/blender/source/blender/src/filelist.c
===================================================================
--- trunk/blender/source/blender/src/filelist.c 2007-09-17 06:11:06 UTC (rev 12056)
+++ trunk/blender/source/blender/src/filelist.c 2007-09-17 10:26:09 UTC (rev 12057)
@@ -481,7 +481,7 @@
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;
More information about the Bf-blender-cvs
mailing list