Consider a large project, where many types are typedef
\'d, e.g.
typedef int age;
typedef int height;
and some functions gettin
Klocwork has some checks related to what they call "strong typing".
For your code it throws STRONG.TYPE.ASSIGN.ARG because argument types do not match.
It also complains about assigning int
values (the consts) to age
and height
typed variables and about using the variables as int
in printf
.
I heard it is quite expensive, though.