Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33659606A325 for ; Tue, 1 Dec 2026 20:01:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=nongnu.org header.i=@nongnu.org header.a=rsa-sha256 header.s=lists1p-gnu-org header.b=PpZwKx+H DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nongnu.org; s=lists1p-gnu-org; h=From:MIME-Version:Date:Subject:To:in-reply-to: references; bh=nhKa1GEjDP0LccbRhnCJY6qg/KX6CFuLEIW46/Ipgzw=; b=PpZwKx+HXxI6mb yYODbgWSt350SRuR/n3YexH3+PI0//0vvJOPZNiTqHBRlzbjjYh19+RfFl9E12R+W4mTMeX7pyYeZ 2WEjUAKY8u+4iDDylDItjKk7q0geF0rP0kd6DiwdYD8h5w0DG1/2FAKz7jSC06GGAfEpRVzlxc6oE 7KB5S9cXIWR7z74Xt4GJsu/aGOq9yIStiT7lbiQuWjHevJBtRzsEPMwkoJHr+ivEYGd20dwpmgOf1 DRlicmMHekpCdstoTGPw3laePG5PAtOpTODygSVab4v+Y8js8TlMADZgviZxoEauOXGF3uVM30ucb LtLV7sjvp8JKermSt7Lw==; Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xYU2H-0002uq-VO; Tue, 01 Dec 2026 15:01:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xYU2C-0002sv-Ao; Tue, 01 Dec 2026 15:01:04 -0500 Received: from v22024089067283036.luckysrv.de ([89.58.38.52]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xYU2A-0000D6-D6; Tue, 01 Dec 2026 15:01:04 -0500 Received: by v22024089067283036.luckysrv.de (Postfix, from userid 1000) id 685F122A8921; Tue, 01 Dec 2026 20:49:09 +0100 (CET) To: Paolo Bonzini Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Stefan Weil Subject: [PATCH for 11.2] rcu: Fix compiler warning for Windows builds Date: Tue, 1 Dec 2026 20:48:59 +0100 Message-ID: <20261201194859.607042-1-sw@weilnetz.de> X-Mailer: git-send-email 2.47.3 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=89.58.38.52; envelope-from=stefan@v22024089067283036.luckysrv.de; helo=v22024089067283036.luckysrv.de X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Stefan Weil From: Stefan Weil via qemu development Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Compiler warning: util/rcu.c:444:12: error: variable 'atfork_depth' set but not used [-Werror,-Wunused-but-set-global] The variable is currently not used for Windows builds. Signed-off-by: Stefan Weil --- util/rcu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util/rcu.c b/util/rcu.c index acac9446ea9..7979707bf85 100644 --- a/util/rcu.c +++ b/util/rcu.c @@ -441,16 +441,22 @@ static void rcu_init_complete(void) rcu_register_thread(); } +#ifdef CONFIG_POSIX static int atfork_depth = 1; +#endif void rcu_enable_atfork(void) { +#ifdef CONFIG_POSIX atfork_depth++; +#endif } void rcu_disable_atfork(void) { +#ifdef CONFIG_POSIX atfork_depth--; +#endif } #ifdef CONFIG_POSIX -- 2.47.3