geom_vinum: fix set but not used warnings

This commit is contained in:
Robert Wing 2022-04-04 13:23:47 -08:00
parent 8f7878e3e1
commit f3f6e0ebe9
2 changed files with 2 additions and 6 deletions

View File

@ -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) {

View File

@ -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);