svn commit: r295768 - head/usr.sbin/iostat

Andrew Turner andrew at fubar.geek.nz
Sun Feb 21 22:00:48 UTC 2016


On Thu, 18 Feb 2016 20:08:01 +0000 (UTC)
Alan Somers <asomers at FreeBSD.org> wrote:

> Author: asomers
> Date: Thu Feb 18 20:08:01 2016
> New Revision: 295768
> URL: https://svnweb.freebsd.org/changeset/base/295768
> 
> Log:
>   Fix compiler warnings in iostat
>   
>   Raise WARNS from 1 to 6 (the default)

This breaks building with gcc:

===> usr.sbin/ifmcstat (all)
===> usr.sbin/iostat (all)
cc1: warnings being treated as errors
/scratch/tmp/andrew/head-git/usr.sbin/iostat/iostat.c: In function 'devstats':
/scratch/tmp/andrew/head-git/usr.sbin/iostat/iostat.c:800: warning: declaration of 'devname' shadows a global declaration
/scratch/tmp/andrew/obj/powerpc.powerpc/scratch/tmp/andrew/head-git/tmp/usr/include/stdlib.h:282: warning: shadowed declaration is here
/scratch/tmp/andrew/head-git/usr.sbin/iostat/iostat.c: In function 'cpustats':
/scratch/tmp/andrew/head-git/usr.sbin/iostat/iostat.c:982: warning: declaration of 'time' shadows a global declaration
/scratch/tmp/andrew/obj/powerpc.powerpc/scratch/tmp/andrew/head-git/tmp/usr/include/time.h:154: warning: shadowed declaration is here
*** Error code 1

Stop.
make[4]: stopped in /scratch/tmp/andrew/head-git/usr.sbin/iostat
*** Error code 1

Stop.
make[3]: stopped in /scratch/tmp/andrew/head-git/usr.sbin
*** Error code 1

Stop.
make[2]: stopped in /scratch/tmp/andrew/head-git
*** Error code 1

Stop.
make[1]: stopped in /scratch/tmp/andrew/head-git
*** Error code 1

Stop.
make: stopped in /scratch/tmp/andrew/head-git

-Wshadow is added to the warning flags with WARNS >= 4.

Andrew


More information about the svn-src-head mailing list