> I have noticed lately that if I have the following:
> foo()
> {
> char c;
>
> if((c = getchar()) != '\n') {
> /* more code here */
> }
> }
>
> and I do not use 'c' any where else lint complains. I get the message
>
> c set but no used in function foo
Ummm... isn't lint right? Why couldn't you just write:
if (getchar() != '\n') { ...