From patchwork Tue Jun 10 16:08:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 31690 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CB9CA20675 for ; Tue, 10 Jun 2014 17:28:59 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id g10sf14085521pdj.7 for ; Tue, 10 Jun 2014 10:28:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=KtklN8BIlvcMCc/CY7xfzYpMYb3kUBCuwfeccHBk/yg=; b=aMJWMrmSSoGAMRpoUAw+wbHAx7hjWLKeW9/IvG7CDOVziJ4+AU1UbxUJO0hF/OBOrv EAqMvOv6RJ9X8cDbaSFMCNhe3An6/oQQkcEquj4LRi9RaAhxRjdYFoICZ8ismjq0G9NB lJ5yQAma7SflI/iKYMXHBNqIQKMQs0mZWHho0e9F4Jd3Jf58Zi7q8erdo0ViMmyjXaQE jnybQAhQRy6VOJ/Sq7mTpadpegtNt4CMmg4tr13+HTUQ1G5XyMmD7jMW4HJ7IOvKBRMs vWLKQ1PkHDuSALuj8umwDveFKzgxYif8txhGsiFIchUaFnCMHOamsdtzYpTBMf2M1Bzk REkw== X-Gm-Message-State: ALoCoQkWkI0DvvJzO6NURjQqCvaU4uxio5aUeOeNqTrGdFGZnjo387HbxUeNo2qdxmCXwWQnVb8o X-Received: by 10.66.97.99 with SMTP id dz3mr3030266pab.24.1402421339104; Tue, 10 Jun 2014 10:28:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.50 with SMTP id i47ls2242277qgd.38.gmail; Tue, 10 Jun 2014 10:28:58 -0700 (PDT) X-Received: by 10.52.154.241 with SMTP id vr17mr27803020vdb.40.1402421338808; Tue, 10 Jun 2014 10:28:58 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id 6si12042731vct.68.2014.06.10.10.28.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Jun 2014 10:28:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id id10so6517108vcb.10 for ; Tue, 10 Jun 2014 10:28:58 -0700 (PDT) X-Received: by 10.52.142.100 with SMTP id rv4mr28560113vdb.50.1402421338401; Tue, 10 Jun 2014 10:28:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp242562vcb; Tue, 10 Jun 2014 10:28:57 -0700 (PDT) X-Received: by 10.224.166.73 with SMTP id l9mr43832417qay.34.1402421337505; Tue, 10 Jun 2014 10:28:57 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id c5si28426922qac.43.2014.06.10.10.28.57 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 10 Jun 2014 10:28:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:41480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuPqz-00013E-1o for patch@linaro.org; Tue, 10 Jun 2014 13:28:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuPq4-0008Qi-Nj for qemu-devel@nongnu.org; Tue, 10 Jun 2014 13:28:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuPpz-0000SA-BG for qemu-devel@nongnu.org; Tue, 10 Jun 2014 13:28:00 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:44493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuPpy-0000Rf-Pi; Tue, 10 Jun 2014 13:27:54 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 870C6412A5; Tue, 10 Jun 2014 21:27:53 +0400 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.corpit.ru (Postfix) with SMTP id 85C316D3; Tue, 10 Jun 2014 20:08:49 +0400 (MSK) Received: (nullmailer pid 13309 invoked by uid 1000); Tue, 10 Jun 2014 16:08:47 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 10 Jun 2014 20:08:27 +0400 Message-Id: <1402416523-13212-10-git-send-email-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1402416523-13212-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1402416523-13212-1-git-send-email-mjt@msgid.tls.msk.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Subject: [Qemu-devel] [PULL 09/25] util/qemu-sockets.c: Avoid unused variable warnings X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mjt@tls.msk.ru X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Peter Maydell The 'on' variable is never used, and 'off' is only used if IPV6_V6ONLY is defined; delete 'on' and move 'off' to the point where it is used. This avoids warnings from clang 3.4. Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- util/qemu-sockets.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 627e609..e3d29ee 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -30,8 +30,6 @@ # define AI_ADDRCONFIG 0 #endif -static const int on=1, off=0; - /* used temporarily until all users are converted to QemuOpts */ QemuOptsList socket_optslist = { .name = "socket", @@ -159,6 +157,7 @@ int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp) #ifdef IPV6_V6ONLY if (e->ai_family == PF_INET6) { /* listen on both ipv4 and ipv6 */ + const int off = 0; qemu_setsockopt(slisten, IPPROTO_IPV6, IPV6_V6ONLY, &off, sizeof(off)); }