[Spice-commits] server/dcc.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Fri Nov 20 03:26:51 PST 2015


 server/dcc.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 2c2e26579f7a47a6c92d18c756a9d45cd141eef8
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Fri Nov 20 12:13:44 2015 +0100

    dcc: Fix unused display_channel variable
    
    Avoid problem when compiling with lz4 and without COMPRESS_STAT
    
    dcc.c: In function 'dcc_compress_image_lz4':
    dcc.c:657:21: error: unused variable 'display_channel' [-Werror=unused-variable]
         DisplayChannel *display_channel = DCC_TO_DC(dcc);
    
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/dcc.c b/server/dcc.c
index 9af6d84..8cc2c0a 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -654,13 +654,12 @@ int dcc_compress_image_lz4(DisplayChannelClient *dcc, SpiceImage *dest,
                            SpiceBitmap *src, compress_send_data_t* o_comp_data,
                            uint32_t group_id)
 {
-    DisplayChannel *display_channel = DCC_TO_DC(dcc);
     Lz4Data *lz4_data = &dcc->lz4_data;
     Lz4EncoderContext *lz4 = dcc->lz4;
     int lz4_size = 0;
 
 #ifdef COMPRESS_STAT
-    stat_time_t start_time = stat_now(display_channel->lz4_stat.clock);
+    stat_time_t start_time = stat_now(DCC_TO_DC(dcc)->lz4_stat.clock);
 #endif
 
     lz4_data->data.bufs_tail = compress_buf_new();
@@ -707,7 +706,7 @@ int dcc_compress_image_lz4(DisplayChannelClient *dcc, SpiceImage *dest,
     o_comp_data->comp_buf = lz4_data->data.bufs_head;
     o_comp_data->comp_buf_size = lz4_size;
 
-    stat_compress_add(&display_channel->lz4_stat, start_time, src->stride * src->y,
+    stat_compress_add(&DCC_TO_DC(dcc)->lz4_stat, start_time, src->stride * src->y,
                       o_comp_data->comp_buf_size);
     return TRUE;
 }


More information about the Spice-commits mailing list