[Spice-devel] [spice-gtk 1/3] gtk: remove unused variables
Christophe Fergeau
cfergeau at gmail.com
Tue Mar 22 07:47:58 PDT 2011
They were spotted by the clang static analyzer.
---
gtk/channel-record.c | 10 ----------
gtk/spice-channel.c | 3 +--
2 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/gtk/channel-record.c b/gtk/channel-record.c
index c7f7054..69c9ea0 100644
--- a/gtk/channel-record.c
+++ b/gtk/channel-record.c
@@ -190,14 +190,10 @@ static void do_emit_main_context(GObject *object, int signum, gpointer params)
static void spice_record_mode(SpiceRecordChannel *channel, uint32_t time,
uint32_t mode, uint8_t *data, uint32_t data_size)
{
- spice_record_channel *rc;
- spice_channel *c;
SpiceMsgcRecordMode m = {0, };
spice_msg_out *msg;
g_return_if_fail(channel != NULL);
- rc = channel->priv;
- c = SPICE_CHANNEL(channel)->priv;
m.mode = mode;
m.time = time;
@@ -226,14 +222,10 @@ static void channel_up(SpiceChannel *channel)
/* main context */
static void spice_record_start_mark(SpiceRecordChannel *channel, uint32_t time)
{
- spice_record_channel *rc;
- spice_channel *c;
SpiceMsgcRecordStartMark m = {0, };
spice_msg_out *msg;
g_return_if_fail(channel != NULL);
- rc = channel->priv;
- c = SPICE_CHANNEL(channel)->priv;
m.time = time;
@@ -256,7 +248,6 @@ void spice_record_send_data(SpiceRecordChannel *channel, gpointer data,
gsize bytes, uint32_t time)
{
spice_record_channel *rc;
- spice_channel *c;
SpiceMsgcRecordPacket p = {0, };
int celt_compressed_frame_bytes = FRAME_SIZE * CELT_BIT_RATE / 44100 / 8;
uint8_t *celt_buf = NULL;
@@ -264,7 +255,6 @@ void spice_record_send_data(SpiceRecordChannel *channel, gpointer data,
g_return_if_fail(channel != NULL);
rc = channel->priv;
- c = SPICE_CHANNEL(channel)->priv;
if (!rc->started) {
spice_record_mode(channel, time, rc->mode, NULL, 0);
diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index ece5688..241c4c1 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -1807,7 +1807,6 @@ static void *spice_channel_coroutine(void *data)
{
SpiceChannel *channel = SPICE_CHANNEL(data);
spice_channel *c = channel->priv;
- int ret;
guint verify;
SPICE_DEBUG("Started background coroutine %p", &c->coroutine);
@@ -1917,7 +1916,7 @@ connected:
c->state = SPICE_CHANNEL_STATE_LINK_HDR;
spice_channel_send_link(channel);
- while ((ret = spice_channel_iterate(channel)))
+ while (spice_channel_iterate(channel))
;
/* TODO: improve it, this is a bit hairy, c->coroutine will be
--
1.7.4
More information about the Spice-devel
mailing list