summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-05-12 15:41:02 +0000
committerharti <harti@FreeBSD.org>2005-05-12 15:41:02 +0000
commit1fa77b7e182e7ad25776a514edfa84ff7c2fe50b (patch)
tree16d771a2b30d090e8aa793a787e5d9789ac15bb1 /usr.bin/make
parent8218c0d11c876124047355f4530af00214e03f85 (diff)
downloadFreeBSD-src-1fa77b7e182e7ad25776a514edfa84ff7c2fe50b.zip
FreeBSD-src-1fa77b7e182e7ad25776a514edfa84ff7c2fe50b.tar.gz
Use a variable initialized to a string instead of the string directly
to get rid of a const warning. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.244)
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/Makefile2
-rw-r--r--usr.bin/make/cond.c13
2 files changed, 8 insertions, 7 deletions
diff --git a/usr.bin/make/Makefile b/usr.bin/make/Makefile
index 40903eb..bbb03de 100644
--- a/usr.bin/make/Makefile
+++ b/usr.bin/make/Makefile
@@ -8,7 +8,7 @@ SRCS= arch.c buf.c cond.c dir.c for.c hash.c hash_tables.c job.c \
lst.c main.c make.c parse.c str.c suff.c targ.c util.c var.c
NO_WERROR=
-WARNS?= 3
+WARNS?= 4
NO_SHARED?= YES
CFLAGS+=-DMAKE_VERSION=\"5200408120\"
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index 8106523..a9209b1 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -476,11 +476,12 @@ CondToken(Boolean doEval)
t = EndOfFile;
break;
case '$': {
- char *lhs;
- char *rhs;
- const char *op;
- size_t varSpecLen = 0;
- Boolean doFree;
+ char *lhs;
+ const char *op;
+ char *rhs;
+ char zero[] = "0";
+ size_t varSpecLen = 0;
+ Boolean doFree;
/*
* Parse the variable spec and skip over it, saving its
@@ -557,7 +558,7 @@ CondToken(Boolean doEval)
default:
op = "!=";
- rhs = "0";
+ rhs = zero;
break;
}
if (*rhs == '"') {
OpenPOWER on IntegriCloud