Module Name:    src
Committed By:   christos
Date:           Sun Jan 30 13:21:09 UTC 2022

Modified Files:
        src/usr.bin/make: dir.c job.c make.h

Log Message:
Make the GNode lineno unsigned to fix lint warning in var.c calling
PrintLocation()


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/usr.bin/make/dir.c
cvs rdiff -u -r1.449 -r1.450 src/usr.bin/make/job.c
cvs rdiff -u -r1.294 -r1.295 src/usr.bin/make/make.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/dir.c
diff -u src/usr.bin/make/dir.c:1.276 src/usr.bin/make/dir.c:1.277
--- src/usr.bin/make/dir.c:1.276	Wed Dec 15 07:24:13 2021
+++ src/usr.bin/make/dir.c	Sun Jan 30 08:21:08 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.276 2021/12/15 12:24:13 rillig Exp $	*/
+/*	$NetBSD: dir.c,v 1.277 2022/01/30 13:21:08 christos 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.276 2021/12/15 12:24:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.277 2022/01/30 13:21:08 christos 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, %d: ignoring stale %s for %s, found %s\n",
+		    "%s: %s, %zu: ignoring stale %s for %s, found %s\n",
 		    progname, gn->fname, gn->lineno,
 		    makeDependfile, gn->name, fullName);
 

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.449 src/usr.bin/make/job.c:1.450
--- src/usr.bin/make/job.c:1.449	Sat Jan 22 13:59:23 2022
+++ src/usr.bin/make/job.c	Sun Jan 30 08:21:08 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.449 2022/01/22 18:59:23 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.450 2022/01/30 13:21:08 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -142,7 +142,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.449 2022/01/22 18:59:23 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.450 2022/01/30 13:21:08 christos Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -1374,7 +1374,7 @@ Job_CheckCommands(GNode *gn, void (*abor
 	if (gn->flags.fromDepend) {
 		if (!Job_RunTarget(".STALE", gn->fname))
 			fprintf(stdout,
-			    "%s: %s, %d: ignoring stale %s for %s\n",
+			    "%s: %s, %zu: ignoring stale %s for %s\n",
 			    progname, gn->fname, gn->lineno, makeDependfile,
 			    gn->name);
 		return true;

Index: src/usr.bin/make/make.h
diff -u src/usr.bin/make/make.h:1.294 src/usr.bin/make/make.h:1.295
--- src/usr.bin/make/make.h:1.294	Sat Jan 29 05:19:49 2022
+++ src/usr.bin/make/make.h	Sun Jan 30 08:21:08 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.h,v 1.294 2022/01/29 10:19:49 rillig Exp $	*/
+/*	$NetBSD: make.h,v 1.295 2022/01/30 13:21:08 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -499,7 +499,7 @@ typedef struct GNode {
 	/* Filename where the GNode got defined, unlimited lifetime */
 	const char *fname;
 	/* Line number where the GNode got defined, 1-based */
-	int lineno;
+	size_t lineno;
 } GNode;
 
 /* Error levels for diagnostics during parsing. */

Reply via email to