[Spice-commits] 2 commits - client/display_channel.cpp common/glc.c

Hans de Goede jwrdegoede at kemper.freedesktop.org
Wed Mar 23 03:24:02 PDT 2011


 client/display_channel.cpp |    3 ---
 common/glc.c               |    5 ++---
 2 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit a81fbdd91c242c9f2ff2cd1edcb5e16dca59d570
Author: Christophe Fergeau <cfergeau at gmail.com>
Date:   Tue Mar 22 17:22:08 2011 +0100

    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.

diff --git a/common/glc.c b/common/glc.c
index e4263cd..e58718f 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) {
commit ade5ecb2c8184775a9b7329d6c026b62cb08a91e
Author: Christophe Fergeau <cfergeau at gmail.com>
Date:   Tue Mar 22 16:16:05 2011 +0100

    opengl: fix compilation
    
    When OpenGL is enabled, build fails in DisplayChannel::create_surface
    because Canvas *canvas is declared twice. Remove the first
    declaration to fix compilation.

diff --git a/client/display_channel.cpp b/client/display_channel.cpp
index 94bfe6b..2950c30 100644
--- a/client/display_channel.cpp
+++ b/client/display_channel.cpp
@@ -1437,9 +1437,6 @@ void DisplayChannel::create_primary_surface(int width, int height, uint32_t form
 
 void DisplayChannel::create_surface(int surface_id, int width, int height, uint32_t format)
 {
-#ifdef USE_OGL
-    Canvas *canvas;
-#endif
     AutoRef<CreateSurfaceEvent> event(new CreateSurfaceEvent(*this, surface_id, width, height,
                                                              format));
     get_client().push_event(*event);


More information about the Spice-commits mailing list