make: set WARNS to 6, from the default 5
No binary change on x86_64.
This commit is contained in:
parent
c410517b42
commit
04db2675e2
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.122 2022/05/03 19:05:34 rillig Exp $
|
||||
# $NetBSD: Makefile,v 1.123 2022/09/27 17:46:58 rillig Exp $
|
||||
# @(#)Makefile 5.2 (Berkeley) 12/28/90
|
||||
|
||||
PROG= make
|
||||
|
@ -22,6 +22,7 @@ SRCS+= targ.c
|
|||
SRCS+= trace.c
|
||||
SRCS+= var.c
|
||||
SRCS+= util.c
|
||||
WARNS= 6
|
||||
|
||||
# Whether to generate a coverage report after running the tests.
|
||||
USE_COVERAGE?= no # works only with gcc; clang9 fails to link
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: arch.c,v 1.210 2022/01/15 18:34:41 rillig Exp $ */
|
||||
/* $NetBSD: arch.c,v 1.211 2022/09/27 17:46:58 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
|
@ -126,7 +126,7 @@
|
|||
#include "config.h"
|
||||
|
||||
/* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */
|
||||
MAKE_RCSID("$NetBSD: arch.c,v 1.210 2022/01/15 18:34:41 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: arch.c,v 1.211 2022/09/27 17:46:58 rillig Exp $");
|
||||
|
||||
typedef struct List ArchList;
|
||||
typedef struct ListNode ArchListNode;
|
||||
|
@ -546,7 +546,8 @@ ArchStatMember(const char *archive, const char *member, bool addToCache)
|
|||
if (strncmp(memName, AR_EFMT1, sizeof AR_EFMT1 - 1) == 0 &&
|
||||
ch_isdigit(memName[sizeof AR_EFMT1 - 1])) {
|
||||
|
||||
size_t elen = atoi(memName + sizeof AR_EFMT1 - 1);
|
||||
size_t elen = (size_t)atoi(
|
||||
memName + sizeof AR_EFMT1 - 1);
|
||||
|
||||
if (elen > MAXPATHLEN)
|
||||
goto badarch;
|
||||
|
@ -788,7 +789,7 @@ ArchFindMember(const char *archive, const char *member, struct ar_hdr *out_arh,
|
|||
if (strncmp(out_arh->ar_name, AR_EFMT1, sizeof AR_EFMT1 - 1) ==
|
||||
0 &&
|
||||
(ch_isdigit(out_arh->ar_name[sizeof AR_EFMT1 - 1]))) {
|
||||
size_t elen = atoi(
|
||||
size_t elen = (size_t)atoi(
|
||||
&out_arh->ar_name[sizeof AR_EFMT1 - 1]);
|
||||
char ename[MAXPATHLEN + 1];
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: make.c,v 1.256 2022/08/17 20:10:29 rillig Exp $ */
|
||||
/* $NetBSD: make.c,v 1.257 2022/09/27 17:46:58 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
|
@ -104,7 +104,7 @@
|
|||
#include "job.h"
|
||||
|
||||
/* "@(#)make.c 8.1 (Berkeley) 6/6/93" */
|
||||
MAKE_RCSID("$NetBSD: make.c,v 1.256 2022/08/17 20:10:29 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: make.c,v 1.257 2022/09/27 17:46:58 rillig Exp $");
|
||||
|
||||
/* Sequence # to detect recursion. */
|
||||
static unsigned int checked_seqno = 1;
|
||||
|
@ -462,7 +462,7 @@ Make_HandleUse(GNode *cgn, GNode *pgn)
|
|||
}
|
||||
|
||||
pgn->type |=
|
||||
cgn->type & ~(OP_OPMASK | OP_USE | OP_USEBEFORE | OP_TRANSFORM);
|
||||
cgn->type & (unsigned)~(OP_OPMASK | OP_USE | OP_USEBEFORE | OP_TRANSFORM);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -820,7 +820,7 @@ UnmarkChildren(GNode *gn)
|
|||
|
||||
for (ln = gn->children.first; ln != NULL; ln = ln->next) {
|
||||
GNode *child = ln->datum;
|
||||
child->type &= ~OP_MARK;
|
||||
child->type &= (unsigned)~OP_MARK;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: parse.c,v 1.687 2022/09/24 16:13:48 rillig Exp $ */
|
||||
/* $NetBSD: parse.c,v 1.688 2022/09/27 17:46:58 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
|
@ -105,7 +105,7 @@
|
|||
#include "pathnames.h"
|
||||
|
||||
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
|
||||
MAKE_RCSID("$NetBSD: parse.c,v 1.687 2022/09/24 16:13:48 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: parse.c,v 1.688 2022/09/27 17:46:58 rillig Exp $");
|
||||
|
||||
/*
|
||||
* A file being read.
|
||||
|
@ -653,7 +653,7 @@ TryApplyDependencyOperator(GNode *gn, GNodeType op)
|
|||
* Propagate copied bits to the initial node. They'll be
|
||||
* propagated back to the rest of the cohorts later.
|
||||
*/
|
||||
gn->type |= op & ~OP_OPMASK;
|
||||
gn->type |= op & (unsigned)~OP_OPMASK;
|
||||
|
||||
cohort = Targ_NewInternalNode(gn->name);
|
||||
if (doing_depend)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: targ.c,v 1.177 2022/04/15 12:19:28 rillig Exp $ */
|
||||
/* $NetBSD: targ.c,v 1.178 2022/09/27 17:46:58 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
|
@ -107,7 +107,7 @@
|
|||
#include "dir.h"
|
||||
|
||||
/* "@(#)targ.c 8.2 (Berkeley) 3/19/94" */
|
||||
MAKE_RCSID("$NetBSD: targ.c,v 1.177 2022/04/15 12:19:28 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: targ.c,v 1.178 2022/09/27 17:46:58 rillig Exp $");
|
||||
|
||||
/*
|
||||
* All target nodes that appeared on the left-hand side of one of the
|
||||
|
@ -599,7 +599,7 @@ Targ_Propagate(void)
|
|||
for (cln = gn->cohorts.first; cln != NULL; cln = cln->next) {
|
||||
GNode *cohort = cln->datum;
|
||||
|
||||
cohort->type |= type & ~OP_OPMASK;
|
||||
cohort->type |= type & (unsigned)~OP_OPMASK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: var.c,v 1.1032 2022/08/24 22:09:40 rillig Exp $ */
|
||||
/* $NetBSD: var.c,v 1.1033 2022/09/27 17:46:58 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
|
@ -139,7 +139,7 @@
|
|||
#include "metachar.h"
|
||||
|
||||
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
|
||||
MAKE_RCSID("$NetBSD: var.c,v 1.1032 2022/08/24 22:09:40 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: var.c,v 1.1033 2022/09/27 17:46:58 rillig Exp $");
|
||||
|
||||
/*
|
||||
* Variables are defined using one of the VAR=value assignments. Their
|
||||
|
@ -1555,7 +1555,7 @@ static void
|
|||
RegexReplaceBackref(char ref, SepBuf *buf, const char *wp,
|
||||
const regmatch_t *m, size_t nsub)
|
||||
{
|
||||
unsigned int n = ref - '0';
|
||||
unsigned int n = (unsigned)ref - '0';
|
||||
|
||||
if (n >= nsub)
|
||||
Error("No subexpression \\%u", n);
|
||||
|
|
Loading…
Reference in New Issue