The branch main has been updated by scottl:

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

commit 2d5d242406e5ce02b9975b366655ba31e2477eef
Author:     Scott Long <[email protected]>
AuthorDate: 2021-12-04 06:40:24 +0000
Commit:     Scott Long <[email protected]>
CommitDate: 2021-12-04 06:40:24 +0000

    Fix "set but not used" for geom
    
    Sponsored by: Rubicon Communications, LLC ("Netgate")
---
 sys/geom/geom_disk.c   | 2 +-
 sys/geom/raid/g_raid.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index 9877243fa36e..c062b0e777ac 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -362,7 +362,7 @@ g_disk_seg_limit(bus_dma_segment_t *seg, off_t *poffset,
 static off_t
 g_disk_vlist_limit(struct disk *dp, struct bio *bp, bus_dma_segment_t 
**pendseg)
 {
-       bus_dma_segment_t *seg, *end;
+       bus_dma_segment_t *seg, *end __diagused;
        off_t residual;
        off_t offset;
        int pages;
diff --git a/sys/geom/raid/g_raid.c b/sys/geom/raid/g_raid.c
index 31adb0f2b513..807cca5b7e50 100644
--- a/sys/geom/raid/g_raid.c
+++ b/sys/geom/raid/g_raid.c
@@ -726,7 +726,7 @@ u_int
 g_raid_nsubdisks(struct g_raid_volume *vol, int state)
 {
        struct g_raid_subdisk *subdisk;
-       struct g_raid_softc *sc;
+       struct g_raid_softc *sc __diagused;
        u_int i, n ;
 
        sc = vol->v_softc;
@@ -751,7 +751,7 @@ struct g_raid_subdisk *
 g_raid_get_subdisk(struct g_raid_volume *vol, int state)
 {
        struct g_raid_subdisk *sd;
-       struct g_raid_softc *sc;
+       struct g_raid_softc *sc __diagused;
        u_int i;
 
        sc = vol->v_softc;
@@ -1181,7 +1181,7 @@ g_raid_is_in_locked_range(struct g_raid_volume *vol, 
const struct bio *bp)
 static void
 g_raid_start_request(struct bio *bp)
 {
-       struct g_raid_softc *sc;
+       struct g_raid_softc *sc __diagused;
        struct g_raid_volume *vol;
 
        sc = bp->bio_to->geom->softc;
@@ -1258,7 +1258,7 @@ g_raid_finish_with_locked_ranges(struct g_raid_volume 
*vol, struct bio *bp)
 void
 g_raid_iodone(struct bio *bp, int error)
 {
-       struct g_raid_softc *sc;
+       struct g_raid_softc *sc __diagused;
        struct g_raid_volume *vol;
 
        sc = bp->bio_to->geom->softc;

Reply via email to