summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorPavel Grunt <pgrunt@redhat.com>2015-11-20 12:13:44 +0100
committerFrediano Ziglio <fziglio@redhat.com>2015-11-20 11:26:12 +0000
commit2c2e26579f7a47a6c92d18c756a9d45cd141eef8 (patch)
tree01b143fb961fb2fbe3a09808efe54401647fe2df /server
parentff070be68f11b934bc22ea51c6b3c66db2c4d745 (diff)
downloadspice-2c2e26579f7a47a6c92d18c756a9d45cd141eef8.zip
spice-2c2e26579f7a47a6c92d18c756a9d45cd141eef8.tar.gz
spice-2c2e26579f7a47a6c92d18c756a9d45cd141eef8.tar.xz
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@redhat.com>
Diffstat (limited to 'server')
-rw-r--r--server/dcc.c5
1 files changed, 2 insertions, 3 deletions
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;
}