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 /source/blender/editors
parent7196fb370e96f987254477e67e414c8072217f50 (diff)
remove assignments which are unused.
Diffstat (limited to 'source/blender/editors')
-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
5 files changed, 19 insertions, 28 deletions
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];