Expected Warning 438: Last value assigned to variable not used
Hi,
For the following code I really expected lint
warning 438. However, lint isn't complaining about
that. Not even when I use -w4 (it complains about
using ++ inside a function call, but not about
438, which is more serious in my opinion)
extern int f(void);
extern void g(int x);
void bla(void)
{
int x = f();
g(x++);
}
Am I misunderstanding something, or is Lint really
lacking here?
Note: If I change the code to do
g(x)
x++;
Which I would think is 'the same', I do get the
438 lint warning of course.
Best regards,
Arnaud Gouder de Beauregard
This issue has been corrected in the upcoming PC-lint Plus.