more lint code

This commit is contained in:
dick
1989-03-06 15:17:39 +00:00
parent 743ba6d408
commit 0b27a93069
10 changed files with 578 additions and 412 deletions

View File

@@ -255,14 +255,6 @@ oper2state(expr, val, used)
case GREATEREQ:
case EQUAL:
case NOTEQUAL:
lint_relop(left, right, oper);
lint_relop(right, left,
oper == '<' ? '>' :
oper == '>' ? '<' :
oper == LESSEQ ? GREATEREQ :
oper == GREATEREQ ? LESSEQ :
oper
);
goto dyadic;
/* dyadic operators */
@@ -338,11 +330,16 @@ expr_ignored(expr)
break;
case Value:
hwarning("value as statement");
if (expr->VL_CLASS == Const) {
hwarning("constant expression ignored");
}
else {
hwarning("value ignored");
}
break;
default: /* String Float */
hwarning("constant as statement");
hwarning("constant ignored");
break;
}
}