From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Na4iT-0004rU-Pf for qemu-devel@nongnu.org; Wed, 27 Jan 2010 05:01:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Na4iO-0004i2-GR for qemu-devel@nongnu.org; Wed, 27 Jan 2010 05:01:41 -0500 Received: from [199.232.76.173] (port=45714 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Na4iO-0004hx-CP for qemu-devel@nongnu.org; Wed, 27 Jan 2010 05:01:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60902) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Na4iN-0003CO-O4 for qemu-devel@nongnu.org; Wed, 27 Jan 2010 05:01:36 -0500 Message-ID: <4B600EA5.4070101@redhat.com> Date: Wed, 27 Jan 2010 11:00:05 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 4/6] vnc.c: warn about ignored option References: <1264547685-21129-1-git-send-email-pbonzini@redhat.com> <1264547685-21129-5-git-send-email-pbonzini@redhat.com> <4B5FA08A.6090107@codemonkey.ws> In-Reply-To: <4B5FA08A.6090107@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paolo Bonzini , qemu-devel@nongnu.org On 01/27/10 03:10, Anthony Liguori wrote: > On 01/26/2010 05:14 PM, Paolo Bonzini wrote: >> Signed-off-by: Paolo Bonzini >> --- >> vnc.c | 1 + >> 1 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/vnc.c b/vnc.c >> index cc2a26e..9ebee09 100644 >> --- a/vnc.c >> +++ b/vnc.c >> @@ -2563,6 +2563,7 @@ int vnc_display_open(DisplayState *ds, const >> char *display) >> reverse = 1; >> } else if (strncmp(options, "to=", 3) == 0) { >> to_port = atoi(options+3) + 5900; >> + fprintf(stderr, "qemu: warning: to= option for -vnc ignored\n"); > > If we're ignoring it, why even have the code? How did clang spot this? to= isn't ignored. The to= handling has been moved to qemu-socket.c though a while ago. So clang spotted correctly that to_port variable is unused. The whole 'if (...) {}' is a leftover which can go away now. cheers, Gerd