summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@gmail.com>2011-03-22 17:22:08 +0100
committerHans de Goede <hdegoede@redhat.com>2011-03-23 11:26:33 +0100
commita81fbdd91c242c9f2ff2cd1edcb5e16dca59d570 (patch)
tree9853a2bc781f50370fd9b367b65e65a956e5542a /common
parentade5ecb2c8184775a9b7329d6c026b62cb08a91e (diff)
downloadspice-a81fbdd91c242c9f2ff2cd1edcb5e16dca59d570.tar.gz
spice-a81fbdd91c242c9f2ff2cd1edcb5e16dca59d570.tar.xz
spice-a81fbdd91c242c9f2ff2cd1edcb5e16dca59d570.zip
common/gl: remove unused variable
clang static analyzer warned that 'len' was computed but never used in glc_vertex2d. glc_stroke_line_dash has side effects so we have to call it, but we don't need to save its return value since it's not used.
Diffstat (limited to 'common')
-rw-r--r--common/glc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/common/glc.c b/common/glc.c
index e4263cd4..e58718f1 100644
--- a/common/glc.c
+++ b/common/glc.c
@@ -1147,10 +1147,9 @@ static double glc_stroke_line_dash(double x1, double y1, double x2, double y2,
static void glc_vertex2d(InternaCtx *ctx, double x, double y)
{
- double len;
if (ctx->path_stroke.state == GLC_STROKE_ACTIVE) {
- len = glc_stroke_line_dash(ctx->path_stroke.x, ctx->path_stroke.y, x, y,
- ctx->line_width, &ctx->line_dash);
+ glc_stroke_line_dash(ctx->path_stroke.x, ctx->path_stroke.y, x, y,
+ ctx->line_width, &ctx->line_dash);
ctx->path_stroke.x = x;
ctx->path_stroke.y = y;
} else if (ctx->path_stroke.state == GLC_STROKE_FIRST) {