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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-17 12:59:23 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-17 12:59:23 +0400
commit7d10ad012d9307cc9db0f91111a14376790f1536 (patch)
treefff2c779e6201ed1780185c5c35e38e364df3d69 /source
parent952b728578bc0ecea22b3659067775102c0eea55 (diff)
fix for bad use of UNUSED() with win32 & some other minor error checks.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_widgets.c7
-rw-r--r--source/blender/render/intern/source/texture.c2
-rw-r--r--source/creator/creator.c4
3 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 7e15f9b1f74..ed7284bf264 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -27,6 +27,7 @@
#include <math.h>
#include <stdlib.h>
#include <string.h>
+#include <assert.h>
#include "DNA_screen_types.h"
@@ -1773,6 +1774,12 @@ void ui_draw_gradient(rcti *rect, float *hsv, int type, float alpha)
VECCOPY(col1[1], col1[2]);
VECCOPY(col1[3], col1[2]);
break;
+ default:
+ assert(!"invalid 'type' argument");
+ hsv_to_rgb(1.0, 1.0, 1.0, &col1[2][0], &col1[2][1], &col1[2][2]);
+ VECCOPY(col1[0], col1[2]);
+ VECCOPY(col1[1], col1[2]);
+ VECCOPY(col1[3], col1[2]);
}
/* old below */
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c
index be2c83a7edf..cdac27f352a 100644
--- a/source/blender/render/intern/source/texture.c
+++ b/source/blender/render/intern/source/texture.c
@@ -771,7 +771,7 @@ static int plugintex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex
if (pit->version < 6) {
texres->tin = pit->result[0];
} else {
- texres->tin = result[0];
+ texres->tin = result[0]; /* XXX, assigning garbage value, fixme! */
}
if(rgbnor & TEX_NOR) {
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 912ae9f3d90..26835eb28da 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -422,11 +422,13 @@ static int without_borders(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(d
return 0;
}
-static int register_extension(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
+static int register_extension(int UNUSED(argc), char **UNUSED(argv), void *data)
{
#ifdef WIN32
char *path = BLI_argsArgv(data)[0];
RegisterBlendExtension(path);
+#else
+ (void)data; /* unused */
#endif
return 0;