fix for bad use of UNUSED() with win32 & some other minor error checks.

This commit is contained in:
Campbell Barton 2010-10-17 08:59:23 +00:00
parent 952b728578
commit 7d10ad012d
3 changed files with 11 additions and 2 deletions

@ -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 */

@ -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) {

@ -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;