From 7d10ad012d9307cc9db0f91111a14376790f1536 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 17 Oct 2010 08:59:23 +0000 Subject: fix for bad use of UNUSED() with win32 & some other minor error checks. --- source/blender/editors/interface/interface_widgets.c | 7 +++++++ source/blender/render/intern/source/texture.c | 2 +- source/creator/creator.c | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'source') 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 #include #include +#include #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; -- cgit v1.2.3