git: e02d0cab7bec - main - asmc: plug set-but-not-unused vars

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Fri, 10 Dec 2021 11:46:50 UTC
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=e02d0cab7bec484fdf108fc6290aa09cecf7cb84

commit e02d0cab7bec484fdf108fc6290aa09cecf7cb84
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-12-10 11:45:36 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2021-12-10 11:45:36 +0000

    asmc: plug set-but-not-unused vars
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/dev/asmc/asmc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c
index 5c10d512361d..24d29ebeb2e0 100644
--- a/sys/dev/asmc/asmc.c
+++ b/sys/dev/asmc/asmc.c
@@ -847,12 +847,16 @@ asmc_wait_ack(device_t dev, uint8_t val, int amount)
 static int
 asmc_wait(device_t dev, uint8_t val)
 {
+#ifdef DEBUG
 	struct asmc_softc *sc;
+#endif
 
 	if (asmc_wait_ack(dev, val, 1000) == 0)
 		return (0);
 
+#ifdef DEBUG
 	sc = device_get_softc(dev);
+#endif
 	val = val & ASMC_STATUS_MASK;
 
 #ifdef DEBUG