[dia] [scan-build] Dead assignment
- From: Hans Breuer <hans src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [dia] [scan-build] Dead assignment
- Date: Tue, 29 Dec 2009 19:14:47 +0000 (UTC)
commit a72e48dc217f20efaab01aadf917181fed6bb40c
Author: Hans Breuer <hans breuer org>
Date: Tue Dec 29 19:03:24 2009 +0100
[scan-build] Dead assignment
Value stored to 'font' is never read,
Value stored to 'w' is never read, etc.
objects/UML/classicon.c | 7 ++-----
objects/UML/node.c | 5 +----
2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/objects/UML/classicon.c b/objects/UML/classicon.c
index 8d628ee..8a941da 100644
--- a/objects/UML/classicon.c
+++ b/objects/UML/classicon.c
@@ -245,7 +245,7 @@ classicon_draw(Classicon *icon, DiaRenderer *renderer)
{
DiaRendererClass *renderer_ops = DIA_RENDERER_GET_CLASS (renderer);
Element *elem;
- real r, x, y, w, h;
+ real r, x, y, w;
Point center, p1, p2;
int i;
@@ -257,8 +257,7 @@ classicon_draw(Classicon *icon, DiaRenderer *renderer)
x = elem->corner.x;
y = elem->corner.y;
w = elem->width;
- h = elem->height;
-
+
r = CLASSICON_RADIOUS;
center.x = x + elem->width/2;
center.y = y + r + CLASSICON_ARROW;
@@ -346,13 +345,11 @@ classicon_update_data(Classicon *cicon)
{
Element *elem = &cicon->element;
DiaObject *obj = &elem->object;
- DiaFont *font;
Point p1;
real h, wt, w = 0;
int is_boundary = (cicon->stereotype==CLASSICON_BOUNDARY);
text_calc_boundingbox(cicon->text, NULL);
- font = cicon->text->font;
h = CLASSICON_AIR + CLASSICON_MARGIN + CLASSICON_ARROW + 2*CLASSICON_RADIOUS;
w = 2*CLASSICON_RADIOUS;
diff --git a/objects/UML/node.c b/objects/UML/node.c
index 3ad178a..2c342dc 100644
--- a/objects/UML/node.c
+++ b/objects/UML/node.c
@@ -293,16 +293,13 @@ node_update_data(Node *node)
{
Element *elem = &node->element;
DiaObject *obj = &node->element.object;
- DiaFont *font;
Point p1;
- real h, w = 0;
+ real h;
text_calc_boundingbox(node->name, NULL);
- font = node->name->font;
h = elem->corner.y + NODE_TEXT_MARGIN;
- w = node->name->max_width;
p1.x = elem->corner.x + NODE_TEXT_MARGIN;
p1.y = h + node->name->ascent; /* position of text */
text_set_position(node->name, &p1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]