git: 1346b9ca7167 - stable/13 - ukswitch: fix non-debug build

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

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

commit 1346b9ca7167789061edec6547f1f8c5b839c71a
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-10 12:52:06 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-14 16:56:33 +0000

    ukswitch: fix non-debug build
    
    PR:             278847
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 2e0c027e69de66afc1157c76bd42ecd3737d54e1)
    (cherry picked from commit 7309d72e140b8d13698c0e88168228f8877aaaad)
---
 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 a5d2de94a13e..ab22ac5f97e9 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);