From owner-svn-src-head@freebsd.org Thu Feb 18 18:07:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6BDAAAC47F; Thu, 18 Feb 2016 18:07:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 987AB19C; Thu, 18 Feb 2016 18:07:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A602BB918; Thu, 18 Feb 2016 13:07:25 -0500 (EST) From: John Baldwin To: Stefan Esser Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r295760 - head/usr.sbin/pciconf Date: Thu, 18 Feb 2016 10:07:21 -0800 Message-ID: <1865104.t06og7Ezta@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201602181523.u1IFNQk8004338@repo.freebsd.org> References: <201602181523.u1IFNQk8004338@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 18 Feb 2016 13:07:25 -0500 (EST) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2016 18:07:26 -0000 On Thursday, February 18, 2016 03:23:26 PM Stefan Esser wrote: > Author: se > Date: Thu Feb 18 15:23:25 2016 > New Revision: 295760 > URL: https://svnweb.freebsd.org/changeset/base/295760 > > Log: > Make WARNS=6 safe. > > Tested with Clang 3.7.1, GCC 4.2.1 and GCC 4.8.5 on amd64. Thanks. > Modified: head/usr.sbin/pciconf/cap.c > ============================================================================== > --- head/usr.sbin/pciconf/cap.c Thu Feb 18 15:12:52 2016 (r295759) > +++ head/usr.sbin/pciconf/cap.c Thu Feb 18 15:23:25 2016 (r295760) > @@ -120,6 +120,9 @@ static void > cap_vpd(int fd, struct pci_conf *p, uint8_t ptr) > { > > + (void)fd; /* UNUSED */ > + (void)p; /* UNUSED */ > + (void)ptr; /* UNUSED */ > printf("VPD"); > } I think we prefer __unused in the parameter declaration instead? That is: cap_vpd(int fd __unused, struct pci_conf *p __unused, uint8_t ptr __unused) > @@ -172,6 +175,7 @@ cap_pcix(int fd, struct pci_conf *p, uin > } > if ((p->pc_hdr & PCIM_HDRTYPE) == 1) > return; > + max_burst_read = 0; > switch (status & PCIXM_STATUS_MAX_READ) { > case PCIXM_STATUS_MAX_READ_512: > max_burst_read = 512; Compilers are simply not smart enough. :-P > Modified: head/usr.sbin/pciconf/pciconf.c > ============================================================================== > --- head/usr.sbin/pciconf/pciconf.c Thu Feb 18 15:12:52 2016 (r295759) > +++ head/usr.sbin/pciconf/pciconf.c Thu Feb 18 15:23:25 2016 (r295760) > @@ -913,7 +915,8 @@ parsesel(const char *str) > ep += 3; > i = 0; > do { > - selarr[i++] = strtoul(ep, &ep, 10); > + selarr[i++] = strtoul(ep, &eppos, 10); > + ep = eppos; > } while ((*ep == ':' || *ep == '.') && *++ep != '\0' && i < 4); This is now indented oddly (2 spaces instead of a tab?). -- John Baldwin