aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2022-08-09 23:30:13 +0000
committerEd Maste <emaste@FreeBSD.org>2022-08-10 14:39:58 +0000
commit7dc4d5118c0268efe48c0e36c49cba1e2a8e39fc (patch)
tree16ba3a75c42452693c46c700d000126293e0fd6f
parentd88eb4654f372d0451139a1dbf525a8f2cad1cf8 (diff)
downloadsrc-7dc4d5118c0268efe48c0e36c49cba1e2a8e39fc.tar.gz
src-7dc4d5118c0268efe48c0e36c49cba1e2a8e39fc.zip
gpio: mark INVARIANTS variables as __diagused
Fixes INVARIANTS build with Clang 15, which previously failed due to set-but-not-used variable warnings. Reviewed by: dim MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36097
-rw-r--r--sys/dev/gpio/gpioc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/gpio/gpioc.c b/sys/dev/gpio/gpioc.c
index dda37ae54a92..4c6270f80cb9 100644
--- a/sys/dev/gpio/gpioc.c
+++ b/sys/dev/gpio/gpioc.c
@@ -269,7 +269,8 @@ gpioc_attach_priv_pin(struct gpioc_cdevpriv *priv,
{
struct gpioc_privs *priv_link;
struct gpioc_pins *pin_link;
- unsigned int consistency_a, consistency_b;
+ unsigned int consistency_a __diagused;
+ unsigned int consistency_b __diagused;
consistency_a = 0;
consistency_b = 0;
@@ -634,7 +635,7 @@ gpioc_cdevpriv_dtor(void *data)
struct gpioc_cdevpriv *priv;
struct gpioc_privs *priv_link, *priv_link_temp;
struct gpioc_pins *pin_link, *pin_link_temp;
- unsigned int consistency;
+ unsigned int consistency __diagused;
priv = data;