From nobody Fri Mar 31 17:59:17 2023 X-Original-To: dev-commits-src-all@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 4Pp7Mp0XbCz433Xd; Fri, 31 Mar 2023 17:59:18 +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 4Pp7Mp06RSz4YYW; Fri, 31 Mar 2023 17:59:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680285558; 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=PBoFb+8o4kl1vkpeBnFfvpCiQrhlqY5NSRHfZGrhOhE=; b=jRdxk/CeXBqYgfsoNXI6iBdOF/3dOsz/8ETogqrU2mt8M0ugox0BB1d4oAOZfqXpON/1RA DDbKGS3l1t+RoZ4zTpNEtSFiUXp79FBjxYbmFrTuY/4ODbWffEFoCgrELkvhCiF6HXKbcd /q+S6OqyzS5Rw14ievutjJlyYvRW05ihyLaQiBfPu/uS2EJne8eLAQ1NGsUf0kqQRF5m05 RSiDRqAe5Gm+k1S409cgiaKYmcCY8KhuSouDaYTA25HPWvJxQs8pVDV1D2AtNDGA860Cub PCi+EdJGKfqF1HJPrdW4h1SpGGEiAyXGmD+ecRTPRVFKkKJWmuLXCn9WUQZ6+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680285558; 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=PBoFb+8o4kl1vkpeBnFfvpCiQrhlqY5NSRHfZGrhOhE=; b=WQcTMc5xY/GbF6k++HX9y692x7td2c/6yGkxbaP92ja4djgABD2HnqpjvBcE2bKGGPHPNN 6hRIRSGc8vyhSTp+Et7E2f2JOVa+hmvDhmsF12WHyCNKJWK5v5iubCgtIBralzovJaFsgk ckdf2teC5gJ6inVe2Ml+aw3YhBk+lSuK9WYhTunXjTxxobBkmipO1xicv7N3W2NQJNGM/6 Ho8UZpHjlTDhxe3fR4qXCRJ/8HH5YfEkrH+TBwotPQt+r7faU02jp3M9+42lLmxBksc2PI v5ZYw+0MSmm+P5KzmYB3jC7paqFpXV72s60+X8yS7QndVhDvmshwXkZE/VuZGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680285558; a=rsa-sha256; cv=none; b=vCOGBYMZPb6jqzXQgGoCgV+ZRmgdFMWuW8QkjNnA9tc4TK4GCMQX/n8qG/nvTgpjnUIWbY A1nMRkkrI11hReR9H2afLLTy41h8xroBI1ZcKXwoUao7d6GvPHe+t0EcGFVU1aTPRzAKuq yLbpGM7KiDYs3R4BowQ8jGn/hVrvSyZ/Vmv3NAMuFFc1M5mVWJzQB4tI0Xc0s4tEqvNJn6 n/iNM/I2Jm/iNj4AgILC4UZ8HrkKC/18aq0t5325ncVSAeSHXslkS04Rde3it4DF+enBSZ 2DFBXiI3+jCk4XfG2s+6Z35uzlkFJwuUqpVomM7Z/qiIrJb2wN7vHXnf161RQA== 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 4Pp7Mn6HCQz13j2; Fri, 31 Mar 2023 17:59:17 +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 32VHxHeJ078843; Fri, 31 Mar 2023 17:59:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32VHxHYU078842; Fri, 31 Mar 2023 17:59:17 GMT (envelope-from git) Date: Fri, 31 Mar 2023 17:59:17 GMT Message-Id: <202303311759.32VHxHYU078842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ad83dd2b2b6b - main - LinuxKPI: Appease -Wunused-but-set-variable warnings from GCC. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad83dd2b2b6bb56c002a93fcf800b30f2ec448d5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ad83dd2b2b6bb56c002a93fcf800b30f2ec448d5 commit ad83dd2b2b6bb56c002a93fcf800b30f2ec448d5 Author: John Baldwin AuthorDate: 2023-03-31 17:56:33 +0000 Commit: John Baldwin CommitDate: 2023-03-31 17:56:33 +0000 LinuxKPI: Appease -Wunused-but-set-variable warnings from GCC. - Mark assert dummy variables as __unused. - Use a dummy (void) cast of the flags argument passed to spin_unlock_irqrestore so it gets treated as used. Reviewed by: manu, hselasky Differential Revision: https://reviews.freebsd.org/D39349 --- sys/compat/linuxkpi/common/include/linux/kernel.h | 2 +- sys/compat/linuxkpi/common/include/linux/spinlock.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 22b25a202395..4fd9f8613895 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -103,7 +103,7 @@ #define _O_CTASSERT(x) _O__CTASSERT(x, __LINE__) #define _O__CTASSERT(x, y) _O___CTASSERT(x, y) #define _O___CTASSERT(x, y) while (0) { \ - typedef char __assert_line_ ## y[(x) ? 1 : -1]; \ + typedef char __unused __assert_line_ ## y[(x) ? 1 : -1]; \ __assert_line_ ## y _x; \ _x[0] = '\0'; \ } diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h index a87cb7180b28..f72a295d2a40 100644 --- a/sys/compat/linuxkpi/common/include/linux/spinlock.h +++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h @@ -128,6 +128,7 @@ typedef struct { } while (0) #define spin_unlock_irqrestore(_l, flags) do { \ + (void)(flags); \ spin_unlock(_l); \ } while (0)