From patchwork Sat Jun 7 16:48:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 31516 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 630662100A for ; Sat, 7 Jun 2014 16:48:08 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id 29sf10756897yhl.2 for ; Sat, 07 Jun 2014 09:48:08 -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:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=/JcbNKcGAio+DDaAXM/wyvJtpFDFNH7Xp9z55fA4RJI=; b=IHIZxvpY9CY6bb9VWLx4MeZY4AzFg13fMT5B+P+3BOdIDIQlkf4pAdqeFAUa6vEImM jINrZVX8voudF21qvuZgsGd+NzGC3KjU0QIrZ+43REc/PnDa5VxzdLMkxvgX0/WXO7e3 JA0PgaNkyraYSuv5r+Fi6grBx8EJVwutvOVyvlyr7x1A4szjlt3SAsmiv23BvMVmim7G K65YrN86rioUmZl2WeVyJik0ycNHCgCgex4YWxKVc/dexbijcaTyBfmtuSJRhfWId3lA a816xzTrkqhw1t0+uVBJyPCSqPC/4mJ0o55o95MQ0TEvnwSOjigEh/Lut2u50Pj6BTvz V3pg== X-Gm-Message-State: ALoCoQloUYpvuneEtGzq3czUgMkY7joVvrCY6vFdZ2v314PUBfaNSo4GDVsc6x8bLOad7M/z9Xkm X-Received: by 10.58.173.231 with SMTP id bn7mr3070851vec.21.1402159687968; Sat, 07 Jun 2014 09:48:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.28.195 with SMTP id 61ls1080519qgz.77.gmail; Sat, 07 Jun 2014 09:48:07 -0700 (PDT) X-Received: by 10.52.6.227 with SMTP id e3mr9586454vda.10.1402159686898; Sat, 07 Jun 2014 09:48:06 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id bk6si8058694vcb.55.2014.06.07.09.48.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 07 Jun 2014 09:48:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id hq11so4659437vcb.11 for ; Sat, 07 Jun 2014 09:48:06 -0700 (PDT) X-Received: by 10.58.237.199 with SMTP id ve7mr4011871vec.66.1402159686494; Sat, 07 Jun 2014 09:48:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp29311vcb; Sat, 7 Jun 2014 09:48:06 -0700 (PDT) X-Received: by 10.194.91.144 with SMTP id ce16mr17134699wjb.18.1402159685627; Sat, 07 Jun 2014 09:48:05 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id eb1si3423598wic.29.2014.06.07.09.48.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 07 Jun 2014 09:48:05 -0700 (PDT) Received-SPF: none (google.com: pm215@archaic.org.uk does not designate permitted sender hosts) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WtJml-0003Wv-Ib; Sat, 07 Jun 2014 17:48:03 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, qemu-trivial@nongnu.org Subject: [PATCH] util/qemu-sockets.c: Avoid unused variable warnings Date: Sat, 7 Jun 2014 17:48:03 +0100 Message-Id: <1402159683-13544-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org 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.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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)); }