svn commit: r315049 - head/usr.bin/vmstat
Conrad Meyer
cem at freebsd.org
Sun Mar 12 01:55:39 UTC 2017
Hi Marcelo,
Should we add WARNS=2 in vmstat's Makefile so that developers notice
when they break warnings at that level?
Thanks,
Conrad
On Fri, Mar 10, 2017 at 8:36 PM, Marcelo Araujo <araujo at freebsd.org> wrote:
> Author: araujo
> Date: Sat Mar 11 04:36:15 2017
> New Revision: 315049
> URL: https://svnweb.freebsd.org/changeset/base/315049
>
> Log:
> Bring back the cast removed in my previous commit to allow us build vmstat
> with WARNS 2. This cast was first introduced at r87690.
>
> Reported by: bde, pfg and ngie
> MFC after: 3 weeks.
>
> Modified:
> head/usr.bin/vmstat/vmstat.c
>
> Modified: head/usr.bin/vmstat/vmstat.c
> ==============================================================================
> --- head/usr.bin/vmstat/vmstat.c Sat Mar 11 04:03:13 2017 (r315048)
> +++ head/usr.bin/vmstat/vmstat.c Sat Mar 11 04:36:15 2017 (r315049)
> @@ -288,13 +288,13 @@ retry_nlist:
> namelist[X_SUM].n_name = "_cnt";
> goto retry_nlist;
> }
> - for (c = 0; c < nitems(namelist); c++)
> + for (c = 0; c < (int)(nitems(namelist)); c++)
> if (namelist[c].n_type == 0)
> bufsize += strlen(namelist[c].n_name) + 1;
> bufsize += len + 1;
> buf = bp = alloca(bufsize);
>
> - for (c = 0; c < nitems(namelist); c++)
> + for (c = 0; c < (int)(nitems(namelist)); c++)
> if (namelist[c].n_type == 0) {
> xo_error(" %s",
> namelist[c].n_name);
>
More information about the svn-src-head
mailing list