git: 7309d72e140b - stable/14 - ukswitch: fix non-debug build

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Tue, 14 May 2024 14:47:35 UTC
The branch stable/14 has been updated by emaste:

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

commit 7309d72e140b8d13698c0e88168228f8877aaaad
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-10 12:52:06 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-14 14:47:00 +0000

    ukswitch: fix non-debug build
    
    PR:             278847
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 2e0c027e69de66afc1157c76bd42ecd3737d54e1)
---
 sys/dev/etherswitch/ukswitch/ukswitch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/etherswitch/ukswitch/ukswitch.c b/sys/dev/etherswitch/ukswitch/ukswitch.c
index 6eff37bb118e..88726422bd01 100644
--- a/sys/dev/etherswitch/ukswitch/ukswitch.c
+++ b/sys/dev/etherswitch/ukswitch/ukswitch.c
@@ -514,7 +514,7 @@ ukswitch_writephy(device_t dev, int phy, int reg, int data)
 static int
 ukswitch_readreg(device_t dev, int addr)
 {
-	struct ukswitch_softc *sc;
+	struct ukswitch_softc *sc __diagused;
 
 	sc = device_get_softc(dev);
 	UKSWITCH_LOCK_ASSERT(sc, MA_OWNED);
@@ -526,7 +526,7 @@ ukswitch_readreg(device_t dev, int addr)
 static int
 ukswitch_writereg(device_t dev, int addr, int value)
 {
-	struct ukswitch_softc *sc;
+	struct ukswitch_softc *sc __diagused;
 
 	sc = device_get_softc(dev);
 	UKSWITCH_LOCK_ASSERT(sc, MA_OWNED);