From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agNVq-0001Ri-92 for qemu-devel@nongnu.org; Wed, 16 Mar 2016 22:18:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agNVm-0007XQ-2Q for qemu-devel@nongnu.org; Wed, 16 Mar 2016 22:18:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agNVl-0007X9-Tv for qemu-devel@nongnu.org; Wed, 16 Mar 2016 22:18:06 -0400 Date: Thu, 17 Mar 2016 10:18:03 +0800 From: Fam Zheng Message-ID: <20160317021803.GF23821@ad.usersys.redhat.com> References: <1458141362-2608-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1458141362-2608-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qemu-ga: drop unused local err variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, Michael Roth On Wed, 03/16 15:16, Stefan Hajnoczi wrote: > Commit 125b310e1d62e3a1dc1e7758563e598957ca7ae4 ("qemu-ga: move > channel/transport functionality into wrapper class") stopped using the > local err variable in channel_event_cb(). > > This patch deletes the unused variable. > > Signed-off-by: Stefan Hajnoczi > --- > qga/main.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/qga/main.c b/qga/main.c > index 0a168e2..743c5c1 100644 > --- a/qga/main.c > +++ b/qga/main.c > @@ -618,13 +618,7 @@ static gboolean channel_event_cb(GIOCondition condition, gpointer data) > GAState *s = data; > gchar buf[QGA_READ_COUNT_DEFAULT+1]; > gsize count; > - GError *err = NULL; > GIOStatus status = ga_channel_read(s->channel, buf, QGA_READ_COUNT_DEFAULT, &count); > - if (err != NULL) { > - g_warning("error reading channel: %s", err->message); > - g_error_free(err); > - return false; > - } > switch (status) { > case G_IO_STATUS_ERROR: > g_warning("error reading channel"); > -- > 2.5.0 > > Reviewed-by: Fam Zheng