remove assignments which are unused.
This commit is contained in:
@@ -625,7 +625,6 @@ void shadeDispList(Scene *scene, Base *base)
|
||||
Object *ob= base->object;
|
||||
DispList *dl, *dlob;
|
||||
Material *ma = NULL;
|
||||
Curve *cu;
|
||||
Render *re;
|
||||
float imat[3][3], mat[4][4], vec[3];
|
||||
float *fp, *nor, n1[3];
|
||||
@@ -659,7 +658,6 @@ void shadeDispList(Scene *scene, Base *base)
|
||||
if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
|
||||
|
||||
/* now we need the normals */
|
||||
cu= ob->data;
|
||||
dl= ob->disp.first;
|
||||
|
||||
while(dl) {
|
||||
|
||||
@@ -115,7 +115,7 @@ static int ptcache_file_read(PTCacheFile *pf, void *f, size_t tot, size_t size);
|
||||
/* Common functions */
|
||||
static int ptcache_basic_header_read(PTCacheFile *pf)
|
||||
{
|
||||
uint32_t totpoint, data_types;
|
||||
uint32_t totpoint, data_types= 0;
|
||||
int error=0;
|
||||
|
||||
/* Custom functions should read these basic elements too! */
|
||||
|
||||
@@ -827,7 +827,7 @@ int isect_sweeping_sphere_tri_v3(float p1[3], float p2[3], float radius, float v
|
||||
sub_v3_v3v3(bv,v0,p1);
|
||||
elen2 = dot_v3v3(e1,e1);
|
||||
edotv = dot_v3v3(e1,vel);
|
||||
edotbv = dot_v3v3(e1,bv);
|
||||
/* edotbv = dot_v3v3(e1,bv); */ /* UNUSED */
|
||||
|
||||
sub_v3_v3v3(bv,v1,p1);
|
||||
elen2 = dot_v3v3(e3,e3);
|
||||
@@ -972,7 +972,6 @@ int isect_line_line_strict_v3(float v1[3], float v2[3], float v3[3], float v4[3]
|
||||
{
|
||||
float a[3], b[3], c[3], ab[3], cb[3], ca[3], dir1[3], dir2[3];
|
||||
float d;
|
||||
float d1;
|
||||
|
||||
sub_v3_v3v3(c, v3, v1);
|
||||
sub_v3_v3v3(a, v2, v1);
|
||||
@@ -985,8 +984,6 @@ int isect_line_line_strict_v3(float v1[3], float v2[3], float v3[3], float v4[3]
|
||||
/* colinear or one vector is zero-length*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
d1 = d;
|
||||
|
||||
cross_v3_v3v3(ab, a, b);
|
||||
d = dot_v3v3(c, ab);
|
||||
|
||||
@@ -169,11 +169,11 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype)
|
||||
memcpy(new_prv, prv, sizeof(PreviewImage));
|
||||
if (prv->rect[0]) {
|
||||
unsigned int *rect = NULL;
|
||||
int rectlen = 0;
|
||||
// int rectlen = 0;
|
||||
new_prv->rect[0] = MEM_callocN(new_prv->w[0]*new_prv->h[0]*sizeof(unsigned int), "prvrect");
|
||||
bhead= blo_nextbhead(fd, bhead);
|
||||
rect = (unsigned int*)(bhead+1);
|
||||
rectlen = new_prv->w[0]*new_prv->h[0]*sizeof(unsigned int);
|
||||
// rectlen = new_prv->w[0]*new_prv->h[0]*sizeof(unsigned int);
|
||||
memcpy(new_prv->rect[0], rect, bhead->len);
|
||||
} else {
|
||||
new_prv->rect[0] = NULL;
|
||||
@@ -181,11 +181,11 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype)
|
||||
|
||||
if (prv->rect[1]) {
|
||||
unsigned int *rect = NULL;
|
||||
int rectlen = 0;
|
||||
// int rectlen = 0;
|
||||
new_prv->rect[1] = MEM_callocN(new_prv->w[1]*new_prv->h[1]*sizeof(unsigned int), "prvrect");
|
||||
bhead= blo_nextbhead(fd, bhead);
|
||||
rect = (unsigned int*)(bhead+1);
|
||||
rectlen = new_prv->w[1]*new_prv->h[1]*sizeof(unsigned int);
|
||||
// rectlen = new_prv->w[1]*new_prv->h[1]*sizeof(unsigned int);
|
||||
memcpy(new_prv->rect[1], rect, bhead->len);
|
||||
} else {
|
||||
new_prv->rect[1] = NULL;
|
||||
|
||||
@@ -791,7 +791,7 @@ void pose_copy_menu(Scene *scene)
|
||||
}
|
||||
else { /* constraints, optional (note: max we can have is 24 constraints) */
|
||||
bConstraint *con, *con_back;
|
||||
int const_toggle[24];
|
||||
int const_toggle[24]= {0}; /* XXX, initialize as 0 to quiet errors */
|
||||
ListBase const_copy = {NULL, NULL};
|
||||
|
||||
BLI_duplicatelist(&const_copy, &(pchanact->constraints));
|
||||
|
||||
@@ -5710,11 +5710,10 @@ static int delete_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
else if(type==1) { /* erase segment */
|
||||
/* find the 2 selected points */
|
||||
bezt1= bezt2= 0;
|
||||
bp1= bp2= 0;
|
||||
nu= nubase->first;
|
||||
nu1= 0;
|
||||
while(nu) {
|
||||
bezt1= bezt2= NULL;
|
||||
bp1= bp2= NULL;
|
||||
nu1= NULL;
|
||||
for(nu= nubase->first; nu; nu= nu->next) {
|
||||
next= nu->next;
|
||||
if(nu->type == CU_BEZIER) {
|
||||
bezt= nu->bezt;
|
||||
@@ -5770,8 +5769,6 @@ static int delete_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
}
|
||||
if(nu1) break;
|
||||
|
||||
nu= nu->next;
|
||||
}
|
||||
if(nu1) {
|
||||
if(bezt1) {
|
||||
|
||||
@@ -56,19 +56,11 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
|
||||
|
||||
switch(RNA_property_type(prop)) {
|
||||
case PROP_BOOLEAN: {
|
||||
int value, length;
|
||||
|
||||
if(arraylen && index == -1)
|
||||
return NULL;
|
||||
|
||||
length= RNA_property_array_length(ptr, prop);
|
||||
|
||||
if(length)
|
||||
value= RNA_property_boolean_get_index(ptr, prop, index);
|
||||
else
|
||||
value= RNA_property_boolean_get(ptr, prop);
|
||||
|
||||
if(icon && name && strcmp(name, "") == 0)
|
||||
if(icon && name && name[0] == '\0')
|
||||
but= uiDefIconButR(block, ICONTOG, 0, icon, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
|
||||
else if(icon)
|
||||
but= uiDefIconTextButR(block, ICONTOG, 0, icon, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
|
||||
|
||||
@@ -1050,7 +1050,7 @@ static TextLine *first_visible_line(SpaceText *st, ARegion *ar, int *wrap_top)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for(i=st->top, pline= text->lines.first; pline->next && i>0; i--)
|
||||
for(i=st->top; pline->next && i>0; i--)
|
||||
pline= pline->next;
|
||||
}
|
||||
|
||||
@@ -1284,7 +1284,7 @@ static void draw_documentation(SpaceText *st, ARegion *ar)
|
||||
{
|
||||
TextLine *tmp;
|
||||
char *docs, buf[DOC_WIDTH+1], *p;
|
||||
int len, i, br, lines;
|
||||
int i, br, lines;
|
||||
int boxw, boxh, l, x, y, top;
|
||||
|
||||
if(!st || !st->text) return;
|
||||
@@ -1309,7 +1309,6 @@ static void draw_documentation(SpaceText *st, ARegion *ar)
|
||||
}
|
||||
|
||||
top= y= ar->winy - st->lheight*l - 2;
|
||||
len= strlen(docs);
|
||||
boxw= DOC_WIDTH*st->cwidth + 20;
|
||||
boxh= (DOC_HEIGHT+1)*st->lheight;
|
||||
|
||||
|
||||
@@ -1344,16 +1344,17 @@ static EnumPropertyItem move_type_items[]= {
|
||||
/* get cursor position in line by relative wrapped line and column positions */
|
||||
static int text_get_cursor_rel(SpaceText* st, ARegion *ar, TextLine *linein, int rell, int relc)
|
||||
{
|
||||
int i, j, start, end, chars, max, chop, curs, loop, endj, found, selc;
|
||||
int i, j, start, end, max, chop, curs, loop, endj, found, selc;
|
||||
char ch;
|
||||
|
||||
max= wrap_width(st, ar);
|
||||
|
||||
selc= start= chars= endj= curs= found= 0;
|
||||
selc= start= endj= curs= found= 0;
|
||||
end= max;
|
||||
chop= loop= 1;
|
||||
|
||||
for(i=0, j=0; loop; j++) {
|
||||
int chars;
|
||||
/* Mimic replacement of tabs */
|
||||
ch= linein->line[j];
|
||||
if(ch=='\t') {
|
||||
@@ -1509,7 +1510,7 @@ static void wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
|
||||
Text *text= st->text;
|
||||
TextLine **linep;
|
||||
int *charp;
|
||||
int oldl, oldc, i, j, max, start, end, chars, endj, chop, loop;
|
||||
int oldl, oldc, i, j, max, start, end, endj, chop, loop;
|
||||
char ch;
|
||||
|
||||
text_update_character_width(st);
|
||||
@@ -1522,12 +1523,13 @@ static void wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
|
||||
|
||||
max= wrap_width(st, ar);
|
||||
|
||||
start= chars= endj= 0;
|
||||
start= endj= 0;
|
||||
end= max;
|
||||
chop= loop= 1;
|
||||
*charp= 0;
|
||||
|
||||
for(i=0, j=0; loop; j++) {
|
||||
int chars;
|
||||
/* Mimic replacement of tabs */
|
||||
ch= (*linep)->line[j];
|
||||
if(ch=='\t') {
|
||||
@@ -1576,7 +1578,7 @@ static void wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
|
||||
Text *text= st->text;
|
||||
TextLine **linep;
|
||||
int *charp;
|
||||
int oldl, oldc, i, j, max, start, end, chars, endj, chop, loop;
|
||||
int oldl, oldc, i, j, max, start, end, endj, chop, loop;
|
||||
char ch;
|
||||
|
||||
text_update_character_width(st);
|
||||
@@ -1589,12 +1591,13 @@ static void wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
|
||||
|
||||
max= wrap_width(st, ar);
|
||||
|
||||
start= chars= endj= 0;
|
||||
start= endj= 0;
|
||||
end= max;
|
||||
chop= loop= 1;
|
||||
*charp= 0;
|
||||
|
||||
for(i=0, j=0; loop; j++) {
|
||||
int chars;
|
||||
/* Mimic replacement of tabs */
|
||||
ch= (*linep)->line[j];
|
||||
if(ch=='\t') {
|
||||
@@ -2241,7 +2244,7 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)
|
||||
x = (x/st->cwidth) + st->left;
|
||||
|
||||
if(st->wordwrap) {
|
||||
int i, j, endj, curs, max, chop, start, end, chars, loop, found;
|
||||
int i, j, endj, curs, max, chop, start, end, loop, found;
|
||||
char ch;
|
||||
|
||||
/* Point to first visible line */
|
||||
@@ -2267,10 +2270,10 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)
|
||||
start= 0;
|
||||
end= max;
|
||||
chop= 1;
|
||||
chars= 0;
|
||||
curs= 0;
|
||||
endj= 0;
|
||||
for(i=0, j=0; loop; j++) {
|
||||
int chars;
|
||||
|
||||
/* Mimic replacement of tabs */
|
||||
ch= (*linep)->line[j];
|
||||
|
||||
@@ -90,15 +90,15 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
|
||||
/* outputs: value, color, normal */
|
||||
|
||||
if(node->id) {
|
||||
RenderData *rd= data;
|
||||
short sizex, sizey;
|
||||
/* RenderData *rd= data; */
|
||||
/* short sizex, sizey; */
|
||||
|
||||
/* first make the preview image */
|
||||
CompBuf *prevbuf= alloc_compbuf(140, 140, CB_RGBA, 1); /* alloc */
|
||||
|
||||
/* Also take care about the render size! */
|
||||
sizex = (rd->size*rd->xsch)/100;
|
||||
sizey = (rd->size*rd->ysch)/100;
|
||||
/* sizex = (rd->size*rd->xsch)/100; */
|
||||
/* sizey = (rd->size*rd->ysch)/100; */
|
||||
|
||||
prevbuf->rect_procedural= texture_procedural;
|
||||
prevbuf->node= node;
|
||||
|
||||
@@ -1462,7 +1462,6 @@ void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg
|
||||
|
||||
case MTEX_LIGHT:
|
||||
fact*= facg;
|
||||
facm= 1.0-fact;
|
||||
|
||||
col= fact*tex[0];
|
||||
if(col > out[0]) in[0]= col; else in[0]= out[0];
|
||||
@@ -1565,7 +1564,6 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen
|
||||
break;
|
||||
|
||||
case MTEX_SOFT_LIGHT:
|
||||
col= fact*tex;
|
||||
scf=1.0 - (1.0 - tex) * (1.0 - out);
|
||||
in= facm*out + fact * ((1.0 - out) * tex * out) + (out * scf);
|
||||
break;
|
||||
@@ -2364,7 +2362,6 @@ void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, floa
|
||||
/* which coords */
|
||||
if(mtex->texco==TEXCO_OBJECT) {
|
||||
Object *ob= mtex->object;
|
||||
ob= mtex->object;
|
||||
if(ob) {
|
||||
VECCOPY(co, xyz);
|
||||
if(mtex->texflag & MTEX_OB_DUPLI_ORIG) {
|
||||
|
||||
Reference in New Issue
Block a user