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)
This commit is contained in:
Hartmut Brandt 2005-05-12 15:41:02 +00:00
parent 375209dd24
commit 6bf2b616ac
2 changed files with 8 additions and 7 deletions

View File

@ -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\"

View File

@ -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 == '"') {