ifconfig: fix -Wunused warnings

MFC after:	2 weeks
This commit is contained in:
Alexander V. Chernikov 2023-06-14 07:59:01 +00:00
parent a6094f844a
commit 3927d0fb37
5 changed files with 12 additions and 12 deletions

View file

@ -144,7 +144,7 @@ in_status(if_ctx *ctx __unused, const struct ifaddrs *ifa)
printf(" broadcast %s", inet_ntoa(sin->sin_addr));
}
print_vhid(ifa, " ");
print_vhid(ifa);
putchar('\n');
}

View file

@ -356,7 +356,7 @@ in6_status(if_ctx *ctx __unused, const struct ifaddrs *ifa)
print_lifetime("vltime", lifetime.ia6t_expire, &now);
}
print_vhid(ifa, " ");
print_vhid(ifa);
putchar('\n');
}

View file

@ -151,7 +151,7 @@ ifclonecreate(if_ctx *ctx, void *arg __unused)
}
static void
clone_create(if_ctx *ctx, const char *cmd __unused, int d __unused)
clone_create(if_ctx *ctx __unused, const char *cmd __unused, int d __unused)
{
callback_register(ifclonecreate, NULL);
}

View file

@ -1230,7 +1230,7 @@ ifconfig_ioctl(if_ctx *orig_ctx, int iscreate, const struct afswtch *uafp)
}
static void
setifaddr(if_ctx *ctx, const char *addr, int param)
setifaddr(if_ctx *ctx, const char *addr, int param __unused)
{
const struct afswtch *afp = ctx->afp;
@ -1279,10 +1279,10 @@ settunnel(if_ctx *ctx, const char *src, const char *dst)
}
static void
deletetunnel(if_ctx *ctx, const char *vname, int param)
deletetunnel(if_ctx *ctx, const char *vname __unused, int param __unused)
{
if (ioctl(ctx->io_s, SIOCDIFPHYADDR, &ifr) < 0)
if (ioctl_ctx(ctx, SIOCDIFPHYADDR, &ifr) < 0)
err(1, "SIOCDIFPHYADDR");
}
@ -1335,7 +1335,7 @@ setifbroadaddr(if_ctx *ctx, const char *addr, int dummy __unused)
}
static void
notealias(if_ctx *ctx, const char *addr, int param)
notealias(if_ctx *ctx, const char *addr __unused, int param)
{
const struct afswtch *afp = ctx->afp;
@ -1515,11 +1515,11 @@ setifpcp(if_ctx *ctx, const char *val, int arg __unused)
}
static void
disableifpcp(if_ctx *ctx, const char *val, int arg __unused)
disableifpcp(if_ctx *ctx, const char *val __unused, int arg __unused)
{
ifr.ifr_lan_pcp = IFNET_PCP_NONE;
if (ioctl(ctx->io_s, SIOCSLANPCP, (caddr_t)&ifr) == -1)
if (ioctl_ctx(ctx, SIOCSLANPCP, (caddr_t)&ifr) == -1)
err(1, "SIOCSLANPCP");
}
@ -1569,7 +1569,7 @@ setifdescr(if_ctx *ctx, const char *val, int dummy __unused)
}
static void
unsetifdescr(if_ctx *ctx, const char *val, int value)
unsetifdescr(if_ctx *ctx, const char *val __unused, int value __unused)
{
setifdescr(ctx, "", 0);
}
@ -1858,7 +1858,7 @@ printb(const char *s, unsigned v, const char *bits)
}
void
print_vhid(const struct ifaddrs *ifa, const char *s)
print_vhid(const struct ifaddrs *ifa)
{
struct if_data *ifd;

View file

@ -294,7 +294,7 @@ uint32_t if_nametoindex_nl(struct snl_state *ss, const char *ifname);
*/
struct ifmediareq *ifmedia_getstate(if_ctx *ctx);
void print_vhid(const struct ifaddrs *, const char *);
void print_vhid(const struct ifaddrs *);
void ifcreate_ioctl(if_ctx *ctx, struct ifreq *ifr);