summaryrefslogtreecommitdiff
path: root/usr.bin/make/dir.c
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2022-02-04 23:22:19 +0000
committerrillig <rillig@NetBSD.org>2022-02-04 23:22:19 +0000
commit2bf5716a7b9fdcc681e834d8aabc5d5fdd340f1b (patch)
tree51e3c924b03f53012efeef3fabbcafb2a5a89b41 /usr.bin/make/dir.c
parent96ab9b0200dc9f801397194d5fca21cd0cdec051 (diff)
make: use unsigned int for line numbers everywhere
Previously, some line numbers were stored as signed int while others were stored as size_t. Since line numbers are never negative, use an unsigned type. Since the maximum file size for makefiles is 1 GB (see loadfile), unsigned int is large enough even on 64-bit platforms. Using a single data types reduces the number of type conversions. Using unsigned int improves compatibility with C90 (printf %u instead of %zu), which is needed by bmake, which is derived from usr.bin/make. No functional change.
Diffstat (limited to 'usr.bin/make/dir.c')
-rw-r--r--usr.bin/make/dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index 0ac71af676f..93479271c94 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.277 2022/01/30 13:21:08 christos Exp $ */
+/* $NetBSD: dir.c,v 1.278 2022/02/04 23:22:19 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -138,7 +138,7 @@
#include "job.h"
/* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: dir.c,v 1.277 2022/01/30 13:21:08 christos Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.278 2022/02/04 23:22:19 rillig Exp $");
/*
* A search path is a list of CachedDir structures. A CachedDir has in it the
@@ -1425,7 +1425,7 @@ ResolveMovedDepends(GNode *gn)
gn->path = bmake_strdup(fullName);
if (!Job_RunTarget(".STALE", gn->fname))
fprintf(stdout, /* XXX: Why stdout? */
- "%s: %s, %zu: ignoring stale %s for %s, found %s\n",
+ "%s: %s, %u: ignoring stale %s for %s, found %s\n",
progname, gn->fname, gn->lineno,
makeDependfile, gn->name, fullName);