cvs commit: src/usr.sbin/pstat Makefile pstat.8 pstat.c
Sam Leffler
sam at errno.com
Mon Mar 21 08:56:06 PST 2005
Giorgos Keramidas wrote:
> On 2005-03-21 16:36, Giorgos Keramidas <keramida at freebsd.org> wrote:
>
>> Revision Changes Path
>> 1.13 +2 -2 src/usr.sbin/pstat/Makefile
>> 1.47 +8 -3 src/usr.sbin/pstat/pstat.8
>> 1.93 +40 -19 src/usr.sbin/pstat/pstat.c
>
>
> This is still WARNS=2 clean, as the previous pstat version.
>
> The following change makes pstat WARNS=3 clean in i386, sparc64 and
> amd64. Are we allowed to use C99 constructs like the ones shown below
> in userlevel code?
>
> %%%
> Index: pstat.c
> ===================================================================
> RCS file: /home/ncvs/src/usr.sbin/pstat/pstat.c,v
> retrieving revision 1.93
> diff -u -r1.93 pstat.c
> --- pstat.c 21 Mar 2005 16:36:05 -0000 1.93
> +++ pstat.c 21 Mar 2005 16:42:45 -0000
> @@ -81,11 +81,11 @@
> };
>
> static struct nlist nl[] = {
> - { "_constty", 0 },
> - { "_maxfiles", 0 },
> - { "_nfiles", 0 },
> - { "_tty_list", 0 },
> - { "" }
> + { .n_name = "_constty" },
> + { .n_name = "_maxfiles" },
> + { .n_name = "_nfiles" },
> + { .n_name = "_tty_list" },
> + { .n_name = "" }
> };
>
> static int humanflag;
> %%%
>
>
ifconfig uses them and noone's slapped me (yet) :)
Sam
More information about the cvs-all
mailing list