Compiler: Fix tautological warning with clang-3.5
This commit is contained in:
parent
dfbc74dc5f
commit
a0cfa59e56
|
@ -4833,7 +4833,7 @@ static void test(int label,int parens,int invert)
|
|||
if (parens)
|
||||
needtoken(')');
|
||||
if (ident==iARRAY || ident==iREFARRAY) {
|
||||
char *ptr=(sym->name!=NULL) ? sym->name : "-unknown-";
|
||||
char *ptr=(sym!=NULL) ? sym->name : "-unknown-";
|
||||
error(33,ptr); /* array must be indexed */
|
||||
} /* if */
|
||||
if (ident==iCONSTEXPR) { /* constant expression */
|
||||
|
|
|
@ -1045,10 +1045,10 @@ static int hier13(value *lval)
|
|||
array1= (lval->ident==iARRAY || lval->ident==iREFARRAY);
|
||||
array2= (lval2.ident==iARRAY || lval2.ident==iREFARRAY);
|
||||
if (array1 && !array2) {
|
||||
char *ptr=(lval->sym!=NULL && lval->sym->name!=NULL) ? lval->sym->name : "-unknown-";
|
||||
char *ptr=(lval->sym!=NULL) ? lval->sym->name : "-unknown-";
|
||||
error(33,ptr); /* array must be indexed */
|
||||
} else if (!array1 && array2) {
|
||||
char *ptr=(lval2.sym!=NULL && lval2.sym->name!=NULL) ? lval2.sym->name : "-unknown-";
|
||||
char *ptr=(lval2.sym!=NULL) ? lval2.sym->name : "-unknown-";
|
||||
error(33,ptr); /* array must be indexed */
|
||||
} /* if */
|
||||
/* ??? if both are arrays, should check dimensions */
|
||||
|
|
Loading…
Reference in New Issue
Block a user