Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Feb 2016 20:20:37 +0000 (UTC)
From:      Stefan Esser <se@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r295769 - head/usr.sbin/pciconf
Message-ID:  <201602182020.u1IKKbNi095246@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: se
Date: Thu Feb 18 20:20:36 2016
New Revision: 295769
URL: https://svnweb.freebsd.org/changeset/base/295769

Log:
  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

Modified:
  head/usr.sbin/pciconf/cap.c
  head/usr.sbin/pciconf/pciconf.c

Modified: head/usr.sbin/pciconf/cap.c
==============================================================================
--- head/usr.sbin/pciconf/cap.c	Thu Feb 18 20:08:01 2016	(r295768)
+++ head/usr.sbin/pciconf/cap.c	Thu Feb 18 20:20:36 2016	(r295769)
@@ -117,12 +117,9 @@ cap_agp(int fd, struct pci_conf *p, uint
 }
 
 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, uin
 }
 
 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");
 }
 

Modified: head/usr.sbin/pciconf/pciconf.c
==============================================================================
--- head/usr.sbin/pciconf/pciconf.c	Thu Feb 18 20:08:01 2016	(r295768)
+++ head/usr.sbin/pciconf/pciconf.c	Thu Feb 18 20:20:36 2016	(r295769)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602182020.u1IKKbNi095246>