diff options
author | se <se@FreeBSD.org> | 2016-02-18 20:20:36 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 2016-02-18 20:20:36 +0000 |
commit | 4afdb85262bef284fd127870987e98948d567deb (patch) | |
tree | 206ce9032f2f8cb2152737d30269295a2d441b34 | |
parent | a107331a23039b0c17735087682d509a7ae638e1 (diff) | |
download | FreeBSD-src-4afdb85262bef284fd127870987e98948d567deb.zip FreeBSD-src-4afdb85262bef284fd127870987e98948d567deb.tar.gz |
Use __unused instead of casting to void to silence the unused parameter
warning.
Fix the indentation of 2 lines to conform with the style of this file.
Submitted by: jhb
-rw-r--r-- | usr.sbin/pciconf/cap.c | 10 | ||||
-rw-r--r-- | usr.sbin/pciconf/pciconf.c | 4 |
2 files changed, 4 insertions, 10 deletions
diff --git a/usr.sbin/pciconf/cap.c b/usr.sbin/pciconf/cap.c index 25132cd..966ef9a0 100644 --- a/usr.sbin/pciconf/cap.c +++ b/usr.sbin/pciconf/cap.c @@ -117,12 +117,9 @@ cap_agp(int fd, struct pci_conf *p, uint8_t ptr) } static void -cap_vpd(int fd, struct pci_conf *p, uint8_t ptr) +cap_vpd(int fd __unused, struct pci_conf *p __unused, uint8_t ptr __unused) { - (void)fd; /* UNUSED */ - (void)p; /* UNUSED */ - (void)ptr; /* UNUSED */ printf("VPD"); } @@ -520,12 +517,9 @@ cap_msix(int fd, struct pci_conf *p, uint8_t ptr) } static void -cap_sata(int fd, struct pci_conf *p, uint8_t ptr) +cap_sata(int fd __unused, struct pci_conf *p __unused, uint8_t ptr __unused) { - (void)fd; /* UNUSED */ - (void)p; /* UNUSED */ - (void)ptr; /* UNUSED */ printf("SATA Index-Data Pair"); } diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c index 85b5e87..e743a89 100644 --- a/usr.sbin/pciconf/pciconf.c +++ b/usr.sbin/pciconf/pciconf.c @@ -915,8 +915,8 @@ parsesel(const char *str) ep += 3; i = 0; do { - selarr[i++] = strtoul(ep, &eppos, 10); - ep = eppos; + selarr[i++] = strtoul(ep, &eppos, 10); + ep = eppos; } while ((*ep == ':' || *ep == '.') && *++ep != '\0' && i < 4); if (i > 2) |