Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/thorpej-i2c-spi-conf2]: src/sys/dev/i2c In iic_close(), mark the "sc" va...



details:   https://anonhg.NetBSD.org/src/rev/4eefa35075f3
branches:  thorpej-i2c-spi-conf2
changeset: 1024882:4eefa35075f3
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Aug 09 01:09:41 2021 +0000

description:
In iic_close(), mark the "sc" variable as __diagused.

diffstat:

 sys/dev/i2c/i2c.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 3182fc267b1b -r 4eefa35075f3 sys/dev/i2c/i2c.c
--- a/sys/dev/i2c/i2c.c Mon Aug 09 00:57:56 2021 +0000
+++ b/sys/dev/i2c/i2c.c Mon Aug 09 01:09:41 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i2c.c,v 1.80.2.1 2021/08/09 00:30:09 thorpej Exp $     */
+/*     $NetBSD: i2c.c,v 1.80.2.2 2021/08/09 01:09:41 thorpej Exp $     */
 
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.80.2.1 2021/08/09 00:30:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.80.2.2 2021/08/09 01:09:41 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -954,7 +954,8 @@
 static int
 iic_close(dev_t dev, int flag, int fmt, lwp_t *l)
 {
-       struct iic_softc *sc = device_lookup_private(&iic_cd, minor(dev));;
+       struct iic_softc *sc __diagused =
+           device_lookup_private(&iic_cd, minor(dev));;
 
        KASSERT(iic_refcnt != 0);
        KASSERT(sc != NULL);



Home | Main Index | Thread Index | Old Index