Fix WARNS=4 issues (-Wcast-qual -Wsign-compare).
XXX: could improve parsing of -v option and store "cutoff" as a uint64_t.
This commit is contained in:
parent
6757e2669a
commit
46a41907e1
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.22 2008/07/21 13:36:59 lukem Exp $ */
|
||||
/* $NetBSD: main.c,v 1.23 2009/04/18 13:37:04 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christopher G. Demetriou
|
||||
@ -39,7 +39,7 @@
|
||||
__COPYRIGHT("@(#) Copyright (c) 1994\
|
||||
Christopher G. Demetriou. All rights reserved.");
|
||||
|
||||
__RCSID("$NetBSD: main.c,v 1.22 2008/07/21 13:36:59 lukem Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.23 2009/04/18 13:37:04 lukem Exp $");
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -76,7 +76,7 @@ int aflag, bflag, cflag, dflag, Dflag, fflag, iflag, jflag, kflag;
|
||||
int Kflag, lflag, mflag, qflag, rflag, sflag, tflag, uflag, vflag;
|
||||
int cutoff = 1;
|
||||
|
||||
static char *dfltargv[] = { _PATH_ACCT };
|
||||
static char *dfltargv[] = { __UNCONST(_PATH_ACCT), 0 };
|
||||
static int dfltargc = (sizeof(dfltargv)/sizeof(char *));
|
||||
|
||||
/* default to comparing by sum of user + system time */
|
||||
@ -303,7 +303,7 @@ acct_load(pn, wr)
|
||||
{
|
||||
struct acct ac;
|
||||
struct cmdinfo ci;
|
||||
int i;
|
||||
size_t i;
|
||||
FILE *fp;
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pdb.c,v 1.12 2003/11/12 13:31:08 grant Exp $ */
|
||||
/* $NetBSD: pdb.c,v 1.13 2009/04/18 13:37:04 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christopher G. Demetriou
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: pdb.c,v 1.12 2003/11/12 13:31:08 grant Exp $");
|
||||
__RCSID("$NetBSD: pdb.c,v 1.13 2009/04/18 13:37:04 lukem Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -261,7 +261,7 @@ pacct_print()
|
||||
/* add to total */
|
||||
add_ci(&ci, &ci_total);
|
||||
|
||||
if (vflag && ci.ci_calls <= cutoff &&
|
||||
if (vflag && ci.ci_calls <= (unsigned)cutoff &&
|
||||
(fflag || check_junk(&ci))) {
|
||||
/* put it into **junk** */
|
||||
add_ci(&ci, &ci_junk);
|
||||
|
Loading…
Reference in New Issue
Block a user