Quiet many compiler warnings.
This commit is contained in:
parent
8198d9b044
commit
d22889b821
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40060
@ -25,7 +25,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: devs.c,v 1.1 1998/09/15 08:16:40 gibbs Exp $
|
||||
* $Id: devs.c,v 1.2 1998/09/20 00:11:23 ken Exp $
|
||||
*/
|
||||
/*
|
||||
* Some code and ideas taken from the old disks.c.
|
||||
@ -70,8 +70,12 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <devstat.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include "systat.h"
|
||||
#include "extern.h"
|
||||
#include "devs.h"
|
||||
|
||||
typedef enum {
|
||||
DS_MATCHTYPE_NONE,
|
||||
@ -190,7 +194,6 @@ dsmatchselect(char *args, devstat_select_mode select_mode, int maxshowdevs,
|
||||
{
|
||||
char **tempstr;
|
||||
char *tstr[100];
|
||||
char *err_str;
|
||||
int num_args = 0;
|
||||
register int i;
|
||||
int retval = 0;
|
||||
|
2
usr.bin/systat/devs.h
Normal file
2
usr.bin/systat/devs.h
Normal file
@ -0,0 +1,2 @@
|
||||
int dsinit(int, struct statinfo *, struct statinfo *, struct statinfo *);
|
||||
int dscmd(char *, char *, int, struct statinfo *);
|
@ -25,7 +25,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: iostat.c,v 1.6 1998/09/15 08:16:40 gibbs Exp $
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1980, 1992, 1993
|
||||
@ -73,8 +73,10 @@ static char sccsid[] = "@(#)iostat.c 8.1 (Berkeley) 6/6/93";
|
||||
#include <nlist.h>
|
||||
#include <paths.h>
|
||||
#include <devstat.h>
|
||||
#include <err.h>
|
||||
#include "systat.h"
|
||||
#include "extern.h"
|
||||
#include "devs.h"
|
||||
|
||||
static struct nlist namelist[] = {
|
||||
#define X_CP_TIME 0
|
||||
@ -103,7 +105,6 @@ static int barlabels __P((int));
|
||||
static void histogram __P((long double, int, double));
|
||||
static int numlabels __P((int));
|
||||
static int devstats __P((int, int, int));
|
||||
static int stats __P((int, int, int));
|
||||
static void stat1 __P((int, int));
|
||||
|
||||
WINDOW *
|
||||
|
@ -38,7 +38,7 @@ static const char rcsid[] =
|
||||
"Id: mbufs.c,v 1.5 1997/02/24 20:59:03 wollman Exp";
|
||||
*/
|
||||
static const char rcsid[] =
|
||||
"$Id: icmp.c,v 1.1 1997/09/24 02:43:39 wollman Exp $";
|
||||
"$Id: ip.c,v 1.1 1997/09/25 00:37:32 wollman Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -143,7 +143,7 @@ static void
|
||||
domode(struct stat *ret)
|
||||
{
|
||||
const struct stat *sub;
|
||||
int i, divisor = 1;
|
||||
int divisor = 1;
|
||||
|
||||
switch(currentmode) {
|
||||
case display_RATE:
|
||||
@ -203,7 +203,6 @@ showip(void)
|
||||
{
|
||||
struct stat stats;
|
||||
u_long totalout;
|
||||
int i;
|
||||
|
||||
domode(&stats);
|
||||
totalout = stats.i.ips_forward + stats.i.ips_localout;
|
||||
|
@ -42,7 +42,7 @@ static char copyright[] =
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: main.c,v 1.8 1998/06/09 04:17:19 imp Exp $";
|
||||
"$Id: main.c,v 1.9 1998/07/06 22:07:58 bde Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -52,6 +52,8 @@ static const char rcsid[] =
|
||||
#include <nlist.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "systat.h"
|
||||
#include "extern.h"
|
||||
|
||||
@ -157,6 +159,8 @@ main(argc, argv)
|
||||
crmode();
|
||||
keyboard();
|
||||
/*NOTREACHED*/
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -34,7 +34,7 @@
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)mbufs.c 8.1 (Berkeley) 6/6/93";
|
||||
static const char rcsid[] =
|
||||
"$Id: mbufs.c,v 1.6 1997/09/24 02:43:40 wollman Exp $";
|
||||
"$Id: mbufs.c,v 1.7 1998/06/09 04:17:21 imp Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -136,7 +136,7 @@ showmbufs()
|
||||
if (mb->m_mbufs) {
|
||||
mvwprintw(wnd, 1+j, 0, "%-10.10s", "free");
|
||||
if (mb->m_mbufs > 60) {
|
||||
snprintf(buf, sizeof(buf), " %d", mb->m_mbufs);
|
||||
snprintf(buf, sizeof(buf), " %ld", mb->m_mbufs);
|
||||
mb->m_mbufs = 60;
|
||||
while (mb->m_mbufs--)
|
||||
waddch(wnd, 'X');
|
||||
|
@ -36,7 +36,7 @@
|
||||
static char sccsid[] = "@(#)netstat.c 8.1 (Berkeley) 6/6/93";
|
||||
*/
|
||||
static const char rcsid[] =
|
||||
"$Id: netstat.c,v 1.9 1998/06/09 04:17:23 imp Exp $";
|
||||
"$Id: netstat.c,v 1.10 1998/06/12 14:15:24 peter Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -167,7 +167,7 @@ initnetstat()
|
||||
void
|
||||
fetchnetstat()
|
||||
{
|
||||
register struct inpcb *prev, *next;
|
||||
register struct inpcb *next;
|
||||
register struct netinfo *p;
|
||||
struct inpcbhead head;
|
||||
struct inpcb inpcb;
|
||||
|
@ -36,7 +36,7 @@
|
||||
static char sccsid[] = "@(#)swap.c 8.3 (Berkeley) 4/29/95";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: swap.c,v 1.5 1997/07/06 04:37:22 bde Exp $";
|
||||
"$Id: swap.c,v 1.6 1998/06/09 04:17:27 imp Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -55,6 +55,8 @@ static const char rcsid[] =
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <err.h>
|
||||
|
||||
#include "systat.h"
|
||||
#include "extern.h"
|
||||
@ -75,7 +77,7 @@ struct nlist syms[] = {
|
||||
#define VM_NSWDEV 3
|
||||
{ "_dmmax" }, /* maximum size of a swap block */
|
||||
#define VM_DMMAX 4
|
||||
0
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static int nswap, nswdev, dmmax;
|
||||
@ -118,6 +120,7 @@ closeswap(w)
|
||||
* Kevin Lahey <kml@rokkaku.atl.ga.us>.
|
||||
*/
|
||||
|
||||
int
|
||||
initswap()
|
||||
{
|
||||
int i;
|
||||
@ -228,7 +231,7 @@ labelswap()
|
||||
void
|
||||
showswap()
|
||||
{
|
||||
int col, row, div, i, j, k, avail, npfree, used, xsize, xfree;
|
||||
int col, div, i, j, k, avail, npfree, used, xsize, xfree;
|
||||
|
||||
div = blocksize / 512;
|
||||
avail = npfree = 0;
|
||||
|
@ -38,7 +38,7 @@ static const char rcsid[] =
|
||||
"Id: mbufs.c,v 1.5 1997/02/24 20:59:03 wollman Exp";
|
||||
*/
|
||||
static const char rcsid[] =
|
||||
"$Id: icmp.c,v 1.1 1997/09/24 02:43:39 wollman Exp $";
|
||||
"$Id: tcp.c,v 1.1 1997/09/27 00:44:55 wollman Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -140,7 +140,7 @@ static void
|
||||
domode(struct tcpstat *ret)
|
||||
{
|
||||
const struct tcpstat *sub;
|
||||
int i, divisor = 1;
|
||||
int divisor = 1;
|
||||
|
||||
switch(currentmode) {
|
||||
case display_RATE:
|
||||
|
@ -36,7 +36,7 @@
|
||||
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: vmstat.c,v 1.27 1998/09/15 08:16:40 gibbs Exp $";
|
||||
"$Id: vmstat.c,v 1.28 1998/10/05 04:04:27 ken Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -69,6 +69,7 @@ static const char rcsid[] =
|
||||
#include <devstat.h>
|
||||
#include "systat.h"
|
||||
#include "extern.h"
|
||||
#include "devs.h"
|
||||
|
||||
static struct Info {
|
||||
long time[CPUSTATES];
|
||||
@ -198,7 +199,6 @@ initkre()
|
||||
{
|
||||
char *intrnamebuf, *cp;
|
||||
int i;
|
||||
static int once = 0;
|
||||
|
||||
if (namelist[0].n_type == 0) {
|
||||
if (kvm_nlist(kd, namelist)) {
|
||||
@ -744,7 +744,6 @@ copyinfo(from, to)
|
||||
register struct Info *from, *to;
|
||||
{
|
||||
long *intrcnt;
|
||||
struct devinfo tmp_dinfo;
|
||||
|
||||
/*
|
||||
* time, wds, seek, and xfer are malloc'd so we have to
|
||||
|
Loading…
Reference in New Issue
Block a user