Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make: set WARNS to 6, from the default 5



details:   https://anonhg.NetBSD.org/src/rev/b77a0b7f1921
branches:  trunk
changeset: 371188:b77a0b7f1921
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Sep 27 17:46:58 2022 +0000

description:
make: set WARNS to 6, from the default 5

No binary change on x86_64.

diffstat:

 usr.bin/make/Makefile |  3 ++-
 usr.bin/make/arch.c   |  9 +++++----
 usr.bin/make/make.c   |  8 ++++----
 usr.bin/make/parse.c  |  6 +++---
 usr.bin/make/targ.c   |  6 +++---
 usr.bin/make/var.c    |  6 +++---
 6 files changed, 20 insertions(+), 18 deletions(-)

diffs (171 lines):

diff -r 56421184002a -r b77a0b7f1921 usr.bin/make/Makefile
--- a/usr.bin/make/Makefile     Tue Sep 27 17:04:52 2022 +0000
+++ b/usr.bin/make/Makefile     Tue Sep 27 17:46:58 2022 +0000
@@ -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+=  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
diff -r 56421184002a -r b77a0b7f1921 usr.bin/make/arch.c
--- a/usr.bin/make/arch.c       Tue Sep 27 17:04:52 2022 +0000
+++ b/usr.bin/make/arch.c       Tue Sep 27 17:46:58 2022 +0000
@@ -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 @@
                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 @@
                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];
 
diff -r 56421184002a -r b77a0b7f1921 usr.bin/make/make.c
--- a/usr.bin/make/make.c       Tue Sep 27 17:04:52 2022 +0000
+++ b/usr.bin/make/make.c       Tue Sep 27 17:46:58 2022 +0000
@@ -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 @@
        }
 
        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 @@
 
        for (ln = gn->children.first; ln != NULL; ln = ln->next) {
                GNode *child = ln->datum;
-               child->type &= ~OP_MARK;
+               child->type &= (unsigned)~OP_MARK;
        }
 }
 
diff -r 56421184002a -r b77a0b7f1921 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Tue Sep 27 17:04:52 2022 +0000
+++ b/usr.bin/make/parse.c      Tue Sep 27 17:46:58 2022 +0000
@@ -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 @@
                 * 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)
diff -r 56421184002a -r b77a0b7f1921 usr.bin/make/targ.c
--- a/usr.bin/make/targ.c       Tue Sep 27 17:04:52 2022 +0000
+++ b/usr.bin/make/targ.c       Tue Sep 27 17:46:58 2022 +0000
@@ -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 @@
                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;
                }
        }
 }
diff -r 56421184002a -r b77a0b7f1921 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Tue Sep 27 17:04:52 2022 +0000
+++ b/usr.bin/make/var.c        Tue Sep 27 17:46:58 2022 +0000
@@ -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 @@
 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);



Home | Main Index | Thread Index | Old Index