From nobody Wed Nov 5 12:52:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1534619411820902.8755236056759; Sat, 18 Aug 2018 12:10:11 -0700 (PDT) Received: from localhost ([::1]:40159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fr6by-0003NU-JQ for importer@patchew.org; Sat, 18 Aug 2018 15:10:10 -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) 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) 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-Google-Smtp-Source: AA+uWPzWpUNkE1eE1bYH8+yHDS3nkuEQvMZ2kaYhQE+jHvgPGeJqixF5nrl3f7Wr+TGCr0nqHHFCFg== X-Received: by 2002:a63:2c8e:: with SMTP id s136-v6mr37150014pgs.390.1534618892017; Sat, 18 Aug 2018 12:01:32 -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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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(-) 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-dec= ls) + -Wold-style-declaration|-Wold-style-definition|-Wredundant-dec= ls|\ + -Wunused-const-variable) ;; *) QEMU_CXXFLAGS=3D${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }$arg @@ -1780,6 +1781,7 @@ gcc_flags=3D"-Wendif-labels -Wno-shift-negative-value= $gcc_flags" gcc_flags=3D"-Wno-initializer-overrides -Wexpansion-to-defined $gcc_flags" gcc_flags=3D"-Wno-string-plus-int $gcc_flags" gcc_flags=3D"-Wno-error=3Daddress-of-packed-member $gcc_flags" +gcc_flags=3D"-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, --=20 2.17.1