From patchwork Sat Aug 18 19:01:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 144507 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2206561ljj; Sat, 18 Aug 2018 12:10:58 -0700 (PDT) X-Google-Smtp-Source: AA+uWPz4Zk6YIZAxWM5+RTk26sBokx+1TSBom4IJwqDi76aHnpaqyUH0flh8RfrDQSVjWxJU3e3L X-Received: by 2002:ac8:2a8f:: with SMTP id b15-v6mr38683829qta.405.1534619458162; Sat, 18 Aug 2018 12:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534619458; cv=none; d=google.com; s=arc-20160816; b=nqzThMfZkxVs3gl3qJoL+K82scalZ4vSUC5Ou7toB+rHlBwiiXsQHJOIDsRWYlASbp cV3YwDrl/vmjOvlfvCJeN/xP9LyOzjtE7Eb9ActSKICAIBHO4oga/Q6cffds1c/yoAxi eFVhJmzX7BMVxBEVjvjUfFA8EEMY6Wv2EKI5WXuz6XI/KrEA1UZRfGG6wUah4hpZiRiJ A321BHns+QxFXcJKtZ78XI0VR+ndCD9AnQgAnx2OGkz5BhQGOKONDtb9xtd69tI8F720 xOKQidflxi1OCV1C/C3M7c2nA/SJLBSx4u6tVJoYZ5atrrXqDhLcWca6Vrnu/YO5Fm+C WCww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=oXnw1VcApfh7h+GZHRD3toWYNubqYaagNqOzFko/Ut4=; b=gZZJlM69GZvc/lENY9zMcVAbTwV5/4hcLDGDMfZVKgikGmeWxima7IIoKsD6VuhI8l LWrZRdnolqtrqhcqi18zQufvm5/tHOfT386YW0ZAdmVfCYfoCq0UQDIH+bJTx8Ya22PJ wFZAL2zn5uK/roraISu209Y7UlsXihLir4iVrFSWC2UhQfaXvixnWL0ejkDOWbDDA4/3 vYPMKK+XJNCwjHKEwDf2Ea2CFf0//II5xGvS0gRmYbyBxKltQ7pJ6XzUYphTf23Qc9Bh mjo23TnNfyDrnzTNeoU7+e2wKbcMmOZh7ewFO2fPC3hWfZFGGXQWn4jP/Z0bS8peOuuQ /u9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EBphLmV+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id z9-v6si1420694qtn.50.2018.08.18.12.10.57 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 18 Aug 2018 12:10:58 -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; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EBphLmV+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fr6cj-0003NU-I7 for patch@linaro.org; Sat, 18 Aug 2018 15:10:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fr6Tj-0005Ij-3w for qemu-devel@nongnu.org; Sat, 18 Aug 2018 15:01:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fr6Te-0007Ce-5C for qemu-devel@nongnu.org; Sat, 18 Aug 2018 15:01:39 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:44527) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fr6Td-0007CB-Vp for qemu-devel@nongnu.org; Sat, 18 Aug 2018 15:01:34 -0400 Received: by mail-pf1-x442.google.com with SMTP id k21-v6so4883781pff.11 for ; Sat, 18 Aug 2018 12:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oXnw1VcApfh7h+GZHRD3toWYNubqYaagNqOzFko/Ut4=; b=EBphLmV+KP8zIMNSd9xKx2PyMrTU84Ki1IBnour+lTQmwptB1B9+5gSZloXpA/NQM0 aZNlMD5lI3wV5kEYicsdyMFEokMWjQ2RoC1mEkC6m+Ch9OIWua9+HUahvryvVYNBHnmm 9R1YslAihGGRgPWYHk4hm2WsFe5HBrJRsRYcI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oXnw1VcApfh7h+GZHRD3toWYNubqYaagNqOzFko/Ut4=; b=e0lQWnoJnTCjGWzq8hWKD3pKJzXATnII3+2rocwQ7eoRUBDZRyb0klMuAy8bXzW4A0 s8f06N3pVjU4IdNN7qQN7UwkU2vtvie6sKAUeStb3a32/msFEbk0fRKGdToVIaWBwTL9 h9UquJZfYt6hHWXCNmmS/pq5NWKZE6ou82BPF+ZQwBl1sFS4yONMewKO79Z5mc07xjeg AApuSXmXxx/KuVk6hpXJINSoWTujiBkzghWqm0JcTYn9lufCf0xlTKmtpvHOFSyOHcxp mUKmwKUQOKe98Pjr99YehEn2stIFCZNFpFNDkJ27QBL9UJD0ie5WEq4a8nINWDmCQYe4 PlYg== X-Gm-Message-State: AOUpUlGnA0IvqjWNTiopRjr6JfmM3q8dRAnAGfnyiIYpwg3FuAtexj2K w/O48ZIMeZFFsfM5e4f8A17XQZhQgzY= X-Received: by 2002:a63:2c8e:: with SMTP id s136-v6mr37150014pgs.390.1534618892017; Sat, 18 Aug 2018 12:01:32 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-8-179.tukw.qwest.net. [97.113.8.179]) by smtp.gmail.com with ESMTPSA id q85-v6sm9362783pfa.151.2018.08.18.12.01.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 18 Aug 2018 12:01:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 18 Aug 2018 12:01:10 -0700 Message-Id: <20180818190118.12911-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180818190118.12911-1-richard.henderson@linaro.org> References: <20180818190118.12911-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::442 Subject: [Qemu-devel] [PATCH v4 08/16] configure: Use -Wunused-const-variable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" For the linux-user syscall split, we have static const structs that must be matched up with a switch statement that uses them. By default, gcc will not warn for such a variable, but silently remove them. For C++, such objects are sometimes declared for their constructor side effects. Do not propagate this flag into QEM_CXXFLAGS. Signed-off-by: Richard Henderson --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Laurent Vivier diff --git a/configure b/configure index db97930314..86e6e18428 100755 --- a/configure +++ b/configure @@ -105,7 +105,8 @@ update_cxxflags() { for arg in $QEMU_CFLAGS; do case $arg in -Wstrict-prototypes|-Wmissing-prototypes|-Wnested-externs|\ - -Wold-style-declaration|-Wold-style-definition|-Wredundant-decls) + -Wold-style-declaration|-Wold-style-definition|-Wredundant-decls|\ + -Wunused-const-variable) ;; *) QEMU_CXXFLAGS=${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }$arg @@ -1780,6 +1781,7 @@ gcc_flags="-Wendif-labels -Wno-shift-negative-value $gcc_flags" gcc_flags="-Wno-initializer-overrides -Wexpansion-to-defined $gcc_flags" gcc_flags="-Wno-string-plus-int $gcc_flags" gcc_flags="-Wno-error=address-of-packed-member $gcc_flags" +gcc_flags="-Wunused-const-variable $gcc_flags" # Note that we do not add -Werror to gcc_flags here, because that would # enable it for all configure tests. If a configure test failed due # to -Werror this would just silently disable some features,