summaryrefslogtreecommitdiff
path: root/usr.bin/nl
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>2009-04-12 23:34:11 +0000
committerlukem <lukem@NetBSD.org>2009-04-12 23:34:11 +0000
commitfc99e5ea7ca2ac4880b168cafdedf7400a97ef88 (patch)
tree77c7d90bd6530860f5ad41a663ff12d59e563e68 /usr.bin/nl
parent510f6be6ed8968b913227a5d8a778974bc2cec1a (diff)
Fix -Wextra and -Wsign-compare issues
Diffstat (limited to 'usr.bin/nl')
-rw-r--r--usr.bin/nl/nl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/nl/nl.c b/usr.bin/nl/nl.c
index 399db575c62..b4025a3a790 100644
--- a/usr.bin/nl/nl.c
+++ b/usr.bin/nl/nl.c
@@ -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.
@@ -33,7 +33,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1999\
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
#include <errno.h>
@@ -69,9 +69,9 @@ struct numbering_property {
#define NP_LAST HEADER
static struct numbering_property numbering_properties[NP_LAST + 1] = {
- { "footer", number_none },
- { "body", number_nonempty },
- { "header", number_none }
+ { "footer", number_none, { 0, 0, 0, 0 } },
+ { "body", number_nonempty, { 0, 0, 0, 0 } },
+ { "header", number_none, { 0, 0, 0, 0 } },
};
#define max(a, b) ((a) > (b) ? (a) : (b))
@@ -276,7 +276,7 @@ main(argc, argv)
}
/* 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) {
perror("cannot allocate preformatting buffer");
exit(EXIT_FAILURE);