From nobody Sat Jul 23 08:59:03 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LqgGJ0XSHz4X77p; Sat, 23 Jul 2022 08:59:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LqgGH5JWmz3h9p; Sat, 23 Jul 2022 08:59:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658566743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oTYuFsvJn5uMVA8LGrxXT6n//U6Fv/1esPz3nx+c85U=; b=xaYxFZ+NPrA0w4AITji6RFuel7R42fQ4q6bQCPaxwIfT4syQ1h9ksNVyU2ER2oM55+nK7g 3Y3uKU6kje6YTXaS+SPI21hkRr604rrQzQZ1X7apKJTSySv6EIXXrKvRuuk1iaiq+qpTvR TdJEXJbqxtZCzD6QdTt854D0h+kcRAHLF6+0W3A+j6NGBs2Xv3pAjWEvjh2sz55daNUfQA 3pTzCXxI9TMvla28Eovy1VmSfMyUNkLHoKVTfx8f4rwIxnfRy4eattc+blCtOc+FC5Mqpz fUz0BYx8Mm1wNjUDdp4QbeEKePb7G4bhYYRnlFEbD4Im339hIZfs1hVl9QTpNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LqgGH4PXnzYtB; Sat, 23 Jul 2022 08:59:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26N8x3Ho013396; Sat, 23 Jul 2022 08:59:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26N8x3DS013395; Sat, 23 Jul 2022 08:59:03 GMT (envelope-from git) Date: Sat, 23 Jul 2022 08:59:03 GMT Message-Id: <202207230859.26N8x3DS013395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4659a5a15ee2 - stable/12 - Suppress unused variable warning in mfi.c List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4659a5a15ee201e582f0e211e7f40bb42bd3a3ed Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658566743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oTYuFsvJn5uMVA8LGrxXT6n//U6Fv/1esPz3nx+c85U=; b=qXaKIY3xLgjc1DMthF2ypcLVHTc3vDwF2sJgoGExB/BSg9xUY3tC2ie5Butw0Nn/mGPltI 6DraLNt1qP0pURRnFu0GIsiZR2MPwLkEFuiarLCDgUZ+aCVVNCG3WMKOa+Y9dNR7lWOGki oK76+ctderb/cRuud6mdxrUj2sbv0V6DFg76cku/CeXgtjQcWKR+je9teOMq1HO6LwPJAB b9WDo2ZmPZmemU3myO6xZObOBTT7XhWTwkcPsT4qHRn3zU9qQhAVTgQDI9Oo+hp1QabM87 4j+EpUbAE5wrNFRSN1/5K3t10UwHEoX+mGK0gNoQYEcG4fVGIvWA6I65zEJSGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658566743; a=rsa-sha256; cv=none; b=eMh8gMhPZIEjFhpcxYJP3zn9vEqGyhm9ZJc9mX7JgX18B4PJUKyw+JhKsqij60bFuYsFZ5 doBulenkBjlHKsROquoO3dS2r+GeIeFea1bPWCOYBqSZ8ElXjjARE3bZxOL/cBFAZLSt1/ hN4B4i5aJIkmEKM0PKpMCxWOEWo6wTQmUdSUn522N1m1cNbbemTbDg1u4s6/79ntKgOCza yt934PoT/61Ta0KxpPga7LSZlPI984FIzCATkPmiEO1z275OI2qXjoEA3JJ8Dg4QnGiOFo c3E0kfN/FS8OmPT2A/sWzKFeq+XbpGANGqPqhmhDD4FGtonLked54zAoW0TC2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4659a5a15ee201e582f0e211e7f40bb42bd3a3ed commit 4659a5a15ee201e582f0e211e7f40bb42bd3a3ed Author: Dimitry Andric AuthorDate: 2022-07-19 19:38:41 +0000 Commit: Dimitry Andric CommitDate: 2022-07-23 08:57:43 +0000 Suppress unused variable warning in mfi.c With clang 15, the following -Werror warnings are produced: sys/dev/mfi/mfi.c:3698:6: error: variable 'timedout' set but not used [-Werror,-Wunused-but-set-variable] int timedout; ^ sys/dev/mfi/mfi.c:3742:6: error: variable 'timedout' set but not used [-Werror,-Wunused-but-set-variable] int timedout = 0; ^ Here, 'timedout' are variables that are only used when debugging, requiring #if 0 statements to be modified. Mark the variables as potentially unused, to suppress the warnings. MFC after: 3 days (cherry picked from commit 3dbe05f61b65a73582aefdc2ee5a50ad2b4390ef) --- sys/dev/mfi/mfi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index 96c63fa3eb61..de62095a36ec 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -3698,7 +3698,7 @@ mfi_dump_all(void) struct mfi_command *cm; devclass_t dc; time_t deadline; - int timedout; + int timedout __unused; int i; dc = devclass_find("mfi"); @@ -3742,7 +3742,7 @@ mfi_timeout(void *data) struct mfi_softc *sc = (struct mfi_softc *)data; struct mfi_command *cm, *tmp; time_t deadline; - int timedout = 0; + int timedout __unused = 0; deadline = time_uptime - mfi_cmd_timeout; if (sc->adpreset == 0) {