splint correctly warns when a variable of a typedef-ed type is assigned a value of a different type. But no warning is given when the variable is initialized:
--------------- example -----------------
typedef unsigned char mychar;
void f( void )
{
mychar a = 'a';
a = 'b';
}
---------------- splint output ---------------
Splint 3.1.1.2 --- 27 May 2007
su.c: (in function f)
su.c:8:3: Assignment of char to mychar: a = 'b'
Types are incompatible. (Use -type to inhibit warning)
Finished checking --- 1 code warning