Make the GNode lineno unsigned to fix lint warning in var.c calling

PrintLocation()
This commit is contained in:
christos 2022-01-30 13:21:08 +00:00
parent 4232aba464
commit 03fbb540b5
3 changed files with 8 additions and 8 deletions

View File

@ -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);

View File

@ -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 (*abortProc)(const char *, ...))
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;

View File

@ -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. */