Module Name: src Committed By: rillig Date: Tue Sep 27 17:46:59 UTC 2022
Modified Files: src/usr.bin/make: Makefile arch.c make.c parse.c targ.c var.c Log Message: make: set WARNS to 6, from the default 5 No binary change on x86_64. To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/usr.bin/make/Makefile cvs rdiff -u -r1.210 -r1.211 src/usr.bin/make/arch.c cvs rdiff -u -r1.256 -r1.257 src/usr.bin/make/make.c cvs rdiff -u -r1.687 -r1.688 src/usr.bin/make/parse.c cvs rdiff -u -r1.177 -r1.178 src/usr.bin/make/targ.c cvs rdiff -u -r1.1032 -r1.1033 src/usr.bin/make/var.c 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/Makefile diff -u src/usr.bin/make/Makefile:1.122 src/usr.bin/make/Makefile:1.123 --- src/usr.bin/make/Makefile:1.122 Tue May 3 19:05:34 2022 +++ src/usr.bin/make/Makefile Tue Sep 27 17:46:58 2022 @@ -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 Index: src/usr.bin/make/arch.c diff -u src/usr.bin/make/arch.c:1.210 src/usr.bin/make/arch.c:1.211 --- src/usr.bin/make/arch.c:1.210 Sat Jan 15 18:34:41 2022 +++ src/usr.bin/make/arch.c Tue Sep 27 17:46:58 2022 @@ -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, cons 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, cons 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]; Index: src/usr.bin/make/make.c diff -u src/usr.bin/make/make.c:1.256 src/usr.bin/make/make.c:1.257 --- src/usr.bin/make/make.c:1.256 Wed Aug 17 20:10:29 2022 +++ src/usr.bin/make/make.c Tue Sep 27 17:46:58 2022 @@ -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; } } Index: src/usr.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.687 src/usr.bin/make/parse.c:1.688 --- src/usr.bin/make/parse.c:1.687 Sat Sep 24 16:13:48 2022 +++ src/usr.bin/make/parse.c Tue Sep 27 17:46:58 2022 @@ -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, GN * 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) Index: src/usr.bin/make/targ.c diff -u src/usr.bin/make/targ.c:1.177 src/usr.bin/make/targ.c:1.178 --- src/usr.bin/make/targ.c:1.177 Fri Apr 15 12:19:28 2022 +++ src/usr.bin/make/targ.c Tue Sep 27 17:46:58 2022 @@ -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; } } } Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.1032 src/usr.bin/make/var.c:1.1033 --- src/usr.bin/make/var.c:1.1032 Wed Aug 24 22:09:40 2022 +++ src/usr.bin/make/var.c Tue Sep 27 17:46:58 2022 @@ -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);