The branch main has been updated by rew:

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

commit f3f6e0ebe9ec2d7904858e16955ddc16a4389f3f
Author:     Robert Wing <r...@freebsd.org>
AuthorDate: 2022-04-04 21:23:47 +0000
Commit:     Robert Wing <r...@freebsd.org>
CommitDate: 2022-04-04 21:23:47 +0000

    geom_vinum: fix set but not used warnings
---
 sys/geom/vinum/geom_vinum.c      | 5 +----
 sys/geom/vinum/geom_vinum_subr.c | 3 +--
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/sys/geom/vinum/geom_vinum.c b/sys/geom/vinum/geom_vinum.c
index 86f5c9f08e1f..b0a278104194 100644
--- a/sys/geom/vinum/geom_vinum.c
+++ b/sys/geom/vinum/geom_vinum.c
@@ -313,7 +313,7 @@ gv_create(struct g_geom *gp, struct gctl_req *req)
        struct gv_sd *s, *s2;
        struct gv_volume *v, *v2;
        struct g_provider *pp;
-       int error, i, *drives, *flags, *plexes, *subdisks, *volumes;
+       int i, *drives, *flags, *plexes, *subdisks, *volumes;
        char buf[20];
 
        g_topology_assert();
@@ -374,7 +374,6 @@ gv_create(struct g_geom *gp, struct gctl_req *req)
 
        /* ... then volume definitions ... */
        for (i = 0; i < *volumes; i++) {
-               error = 0;
                snprintf(buf, sizeof(buf), "volume%d", i);
                v2 = gctl_get_paraml(req, buf, sizeof(*v2));
                if (v2 == NULL) {
@@ -397,7 +396,6 @@ gv_create(struct g_geom *gp, struct gctl_req *req)
 
        /* ... then plex definitions ... */
        for (i = 0; i < *plexes; i++) {
-               error = 0;
                snprintf(buf, sizeof(buf), "plex%d", i);
                p2 = gctl_get_paraml(req, buf, sizeof(*p2));
                if (p2 == NULL) {
@@ -420,7 +418,6 @@ gv_create(struct g_geom *gp, struct gctl_req *req)
 
        /* ... and, finally, subdisk definitions. */
        for (i = 0; i < *subdisks; i++) {
-               error = 0;
                snprintf(buf, sizeof(buf), "sd%d", i);
                s2 = gctl_get_paraml(req, buf, sizeof(*s2));
                if (s2 == NULL) {
diff --git a/sys/geom/vinum/geom_vinum_subr.c b/sys/geom/vinum/geom_vinum_subr.c
index 54dd6db95e5e..b68541bf00a7 100644
--- a/sys/geom/vinum/geom_vinum_subr.c
+++ b/sys/geom/vinum/geom_vinum_subr.c
@@ -1168,7 +1168,7 @@ int
 gv_attach_sd(struct gv_sd *s, struct gv_plex *p, off_t offset, int rename)
 {
        struct gv_sd *s2;
-       int error, sdcount;
+       int error;
 
        g_topology_assert();
 
@@ -1193,7 +1193,6 @@ gv_attach_sd(struct gv_sd *s, struct gv_plex *p, off_t 
offset, int rename)
        s->plex_offset = offset;
        strlcpy(s->plex, p->name, sizeof(s->plex));
 
-       sdcount = p->sdcount;
        error = gv_sd_to_plex(s, p);
        if (error)
                return (error);

Reply via email to