Fix -Wextra and -Wsign-compare issues
This commit is contained in:
parent
510f6be6ed
commit
fc99e5ea7c
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: nfsstat.c,v 1.22 2008/07/21 14:19:24 lukem Exp $ */
|
/* $NetBSD: nfsstat.c,v 1.23 2009/04/12 23:34:11 lukem Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1983, 1989, 1993
|
* Copyright (c) 1983, 1989, 1993
|
||||||
@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1989, 1993\
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "from: @(#)nfsstat.c 8.1 (Berkeley) 6/6/93";
|
static char sccsid[] = "from: @(#)nfsstat.c 8.1 (Berkeley) 6/6/93";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: nfsstat.c,v 1.22 2008/07/21 14:19:24 lukem Exp $");
|
__RCSID("$NetBSD: nfsstat.c,v 1.23 2009/04/12 23:34:11 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
@ -70,8 +70,8 @@ __RCSID("$NetBSD: nfsstat.c,v 1.22 2008/07/21 14:19:24 lukem Exp $");
|
|||||||
|
|
||||||
struct nlist nl[] = {
|
struct nlist nl[] = {
|
||||||
#define N_NFSSTAT 0
|
#define N_NFSSTAT 0
|
||||||
{ "_nfsstats" },
|
{ "_nfsstats", 0, 0, 0, 0 },
|
||||||
{ "" },
|
{ "", 0, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MASK(a) (1 << NFSPROC_##a)
|
#define MASK(a) (1 << NFSPROC_##a)
|
||||||
@ -404,7 +404,7 @@ sidewaysintpr(interval)
|
|||||||
memset(&last, 0, sizeof(last));
|
memset(&last, 0, sizeof(last));
|
||||||
|
|
||||||
for (hdrcnt = 1;;) {
|
for (hdrcnt = 1;;) {
|
||||||
int i;
|
size_t i;
|
||||||
|
|
||||||
if (!--hdrcnt) {
|
if (!--hdrcnt) {
|
||||||
printhdr();
|
printhdr();
|
||||||
@ -453,7 +453,7 @@ sidewaysintpr(interval)
|
|||||||
void
|
void
|
||||||
printhdr()
|
printhdr()
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
|
|
||||||
printf(" ");
|
printf(" ");
|
||||||
for (i = 0; i < NSHORTPROC; i++)
|
for (i = 0; i < NSHORTPROC; i++)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: nl.c,v 1.9 2008/07/21 14:19:24 lukem Exp $ */
|
/* $NetBSD: nl.c,v 1.10 2009/04/12 23:37:12 lukem Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||||
@ -33,7 +33,7 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
__COPYRIGHT("@(#) Copyright (c) 1999\
|
__COPYRIGHT("@(#) Copyright (c) 1999\
|
||||||
The NetBSD Foundation, Inc. All rights reserved.");
|
The NetBSD Foundation, Inc. All rights reserved.");
|
||||||
__RCSID("$NetBSD: nl.c,v 1.9 2008/07/21 14:19:24 lukem Exp $");
|
__RCSID("$NetBSD: nl.c,v 1.10 2009/04/12 23:37:12 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -69,9 +69,9 @@ struct numbering_property {
|
|||||||
#define NP_LAST HEADER
|
#define NP_LAST HEADER
|
||||||
|
|
||||||
static struct numbering_property numbering_properties[NP_LAST + 1] = {
|
static struct numbering_property numbering_properties[NP_LAST + 1] = {
|
||||||
{ "footer", number_none },
|
{ "footer", number_none, { 0, 0, 0, 0 } },
|
||||||
{ "body", number_nonempty },
|
{ "body", number_nonempty, { 0, 0, 0, 0 } },
|
||||||
{ "header", number_none }
|
{ "header", number_none, { 0, 0, 0, 0 } },
|
||||||
};
|
};
|
||||||
|
|
||||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||||
@ -276,7 +276,7 @@ main(argc, argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate a buffer suitable for preformatting line number. */
|
/* Allocate a buffer suitable for preformatting line number. */
|
||||||
intbuffersize = max(INT_STRLEN_MAXIMUM, width) + 1; /* NUL */
|
intbuffersize = max((int)INT_STRLEN_MAXIMUM, width) + 1; /* NUL */
|
||||||
if ((intbuffer = malloc(intbuffersize)) == NULL) {
|
if ((intbuffer = malloc(intbuffersize)) == NULL) {
|
||||||
perror("cannot allocate preformatting buffer");
|
perror("cannot allocate preformatting buffer");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
Loading…
Reference in New Issue
Block a user