Package: cppcheck
Version: 1.44-1
Severity: normal
Hello Reijo,
cppcheck seems to misprocess typedef:
The code below report erronously:
[cpp.c:8]: (style) Variable 'b' is assigned a value that is never used.
typedef long* GEN;
void
sort_factor(GEN *y, long n)
{
GEN a, b;
a = y[1]; b = y[2];
a[0] = 1; b[0] = 2;
}
It seems that cppcheck read 'GEN a, b;' as 'long *a, b;' instead of 'long *a,
*b',
thus it does not understand that b is a pointer.
Cheers,
--
Bill. <[email protected]>
Imagine a large red swirl here.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]