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(1): fix type mismatch in compare_expression



details:   https://anonhg.NetBSD.org/src/rev/22d783307a64
branches:  trunk
changeset: 937259:22d783307a64
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Aug 13 20:13:46 2020 +0000

description:
make(1): fix type mismatch in compare_expression

This was caught by a simple "typedef double Boolean" in sprite.h.

If only there were a C compiler with "strict" mode, where pointers,
numbers and booleans were separate and unassignable data types, this
copy-and-paste typo would have been caught much earlier.

diffstat:

 usr.bin/make/cond.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 3a4c3a2c0db5 -r 22d783307a64 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Thu Aug 13 19:30:37 2020 +0000
+++ b/usr.bin/make/cond.c       Thu Aug 13 20:13:46 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.94 2020/08/13 19:30:37 rillig Exp $ */
+/*     $NetBSD: cond.c,v 1.95 2020/08/13 20:13:46 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.94 2020/08/13 19:30:37 rillig Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.95 2020/08/13 20:13:46 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)cond.c     8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: cond.c,v 1.94 2020/08/13 19:30:37 rillig Exp $");
+__RCSID("$NetBSD: cond.c,v 1.95 2020/08/13 20:13:46 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -531,7 +531,7 @@
 
     t = TOK_ERROR;
     rhs = NULL;
-    lhsFree = rhsFree = FALSE;
+    lhsFree = rhsFree = NULL;
     lhsQuoted = rhsQuoted = FALSE;
 
     /*



Home | Main Index | Thread Index | Old Index