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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-01-06 04:29:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-06 04:29:13 +0300
commit5f64450726e1efbfad97525bb36bfea2c51afa09 (patch)
treeef6ab06292f905ec3be75bc5068393b17a28f0ad
parent7196fb370e96f987254477e67e414c8072217f50 (diff)
remove assignments which are unused.
-rw-r--r--source/blender/blenkernel/intern/displist.c2
-rw-r--r--source/blender/blenkernel/intern/pointcache.c2
-rw-r--r--source/blender/blenlib/intern/math_geom.c5
-rw-r--r--source/blender/blenloader/intern/readblenentry.c8
-rw-r--r--source/blender/editors/armature/poseobject.c2
-rw-r--r--source/blender/editors/curve/editcurve.c11
-rw-r--r--source/blender/editors/interface/interface_utils.c10
-rw-r--r--source/blender/editors/space_text/text_draw.c5
-rw-r--r--source/blender/editors/space_text/text_ops.c19
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_texture.c8
-rw-r--r--source/blender/render/intern/source/texture.c3
11 files changed, 29 insertions, 46 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 612d0d4fe38..8c32733dd66 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -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) {
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index b8e8508da26..c886c252d61 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -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! */
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 673d8113f32..605f3ad785e 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -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);
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 87ff98eef1d..8b16e11f25e 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -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;
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index bea7155291b..21431bb40b5 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -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));
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 5dbff672db9..93cf02c4cb1 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -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) {
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index dbe3697c76a..2f7e0beeba6 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -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);
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 371b2f7e594..f682da5f179 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -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;
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index e3ac59861bf..03d806f446c 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -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];
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c b/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
index 77c71ad7e3a..b6335d6afe7 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
@@ -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;
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c
index 684732c10d3..0be2f1719be 100644
--- a/source/blender/render/intern/source/texture.c
+++ b/source/blender/render/intern/source/texture.c
@@ -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) {