From nobody Tue Feb 10 21:59:30 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1667420645; cv=none; d=zohomail.com; s=zohoarc; b=KWkBSUwoRDxxLM6QlstSKOFgvLr7VwFlMC9JdZLkNOcaQ8ZaDXGclaZ+JyAeIKZM9N5UNZMgO3HVjHq7xwXyaOgx++EMNzc4zDursM0TQxpdao+7dhBspb2Q+ivGopy9Juf/sgjX1Rkf0xgM5BO0SsD6ZeNQr8KJUzjS/b1bf6g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667420645; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=vQXCZ+Eijha5kIDCooVxgTpj5C03XR2GwHRyjnC7PQk=; b=PvpTyJJTAEPhElOc8D8Ot+pO/G5HkQDEiLrBfLx70OzysmvXuAT5lf3pbvKS22hQ9kKECRA41ie/nrEQwFoWCrxWnYUKigdP3gVPg7jXxrJzef2tMVFuSFZRMicIKm9wXCUPao4GTZ+hl+JKlQFYhJT59Y4pkuzIL+NuEUZZM5E= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667420645258957.709600330799; Wed, 2 Nov 2022 13:24:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqKGR-0000dx-W9; Wed, 02 Nov 2022 16:23:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqKGP-0000dO-R7; Wed, 02 Nov 2022 16:23:05 -0400 Received: from mail.weilnetz.de ([37.120.169.71] helo=mail.v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqKGO-00013C-0v; Wed, 02 Nov 2022 16:23:05 -0400 Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by mail.v2201612906741603.powersrv.de (Postfix) with ESMTP id 0E150DA0277; Wed, 2 Nov 2022 21:23:00 +0100 (CET) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id 04F264621B3; Wed, 2 Nov 2022 21:23:00 +0100 (CET) To: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Cc: Stefan Weil Subject: [PATCH for 7.2] Fix broken configure with -Wunused-parameter Date: Wed, 2 Nov 2022 21:22:58 +0100 Message-Id: <20221102202258.456359-1-sw@weilnetz.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=37.120.169.71; envelope-from=stefan@weilnetz.de; helo=mail.v2201612906741603.powersrv.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1667420646402100001 Content-Type: text/plain; charset="utf-8" The configure script fails because it tries to compile small C programs with a main function which is declared with arguments argc and argv although those arguments are unused. Running `configure -extra-cflags=3D-Wunused-parameter` triggers the problem. configure for a native build does abort but shows the error in config.log. A cross build configure for Windows with Debian stable aborts with an error. Avoiding unused arguments fixes this. Signed-off-by: Stefan Weil --- See https://gitlab.com/qemu-project/qemu/-/issues/1295. I noticed the problem because I often compile with -Wextra. Stefan configure | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 4275f5419f..1106c04fea 100755 --- a/configure +++ b/configure @@ -1258,6 +1258,7 @@ if test "$stack_protector" !=3D "no"; then cat > $TMPC << EOF int main(int argc, char *argv[]) { + (void)argc; char arr[64], *p =3D arr, *c =3D argv[0]; while (*c) { *p++ =3D *c++; @@ -1607,7 +1608,7 @@ fi =20 if test "$safe_stack" =3D "yes"; then cat > $TMPC << EOF -int main(int argc, char *argv[]) +int main(void) { #if ! __has_feature(safe_stack) #error SafeStack Disabled @@ -1629,7 +1630,7 @@ EOF fi else cat > $TMPC << EOF -int main(int argc, char *argv[]) +int main(void) { #if defined(__has_feature) #if __has_feature(safe_stack) @@ -1675,7 +1676,7 @@ static const int Z =3D 1; #define TAUT(X) ((X) =3D=3D Z) #define PAREN(X, Y) (X =3D=3D Y) #define ID(X) (X) -int main(int argc, char *argv[]) +int main(void) { int x =3D 0, y =3D 0; x =3D ID(x); --=20 2.30.2