[Spice-devel] [PATCH] Remove only written field

Frediano Ziglio fziglio at redhat.com
Fri Jun 3 13:43:22 UTC 2016


EncoderData::dcc field is never read back.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/dcc-encoders.c | 1 -
 server/dcc-encoders.h | 1 -
 server/dcc.c          | 2 --
 3 files changed, 4 deletions(-)

diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c
index d4a0ec5..218522e 100644
--- a/server/dcc-encoders.c
+++ b/server/dcc-encoders.c
@@ -143,7 +143,6 @@ void encoder_data_init(EncoderData *data, DisplayChannelClient *dcc)
 {
     data->bufs_tail = g_new(RedCompressBuf, 1);
     data->bufs_head = data->bufs_tail;
-    data->dcc = dcc;
     data->bufs_head->send_next = NULL;
 }
 
diff --git a/server/dcc-encoders.h b/server/dcc-encoders.h
index b66fb1e..82750be 100644
--- a/server/dcc-encoders.h
+++ b/server/dcc-encoders.h
@@ -80,7 +80,6 @@ GlzSharedDictionary* dcc_restore_glz_dictionary              (DisplayChannelClie
                                                               GlzEncDictRestoreData *restore_data);
 
 typedef struct  {
-    DisplayChannelClient *dcc;
     RedCompressBuf *bufs_head;
     RedCompressBuf *bufs_tail;
     jmp_buf jmp_env;
diff --git a/server/dcc.c b/server/dcc.c
index ef43a3c..9cc651b 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -938,8 +938,6 @@ static int dcc_compress_image_jpeg(DisplayChannelClient *dcc, SpiceImage *dest,
     comp_head_left = sizeof(lz_data->data.bufs_head->buf) - comp_head_filled;
     lz_out_start_byte = lz_data->data.bufs_head->buf.bytes + comp_head_filled;
 
-    lz_data->data.dcc = dcc;
-
     lz_data->data.u.lines_data.chunks = src->data;
     lz_data->data.u.lines_data.stride = src->stride;
     lz_data->data.u.lines_data.next = 0;
-- 
2.7.4



More information about the Spice-devel mailing list