Howcome is it that the following code:
#include <string.h> static unsigned char buf[ 20]; void func( void) { strcpy( buf, "huuhaa"); }
huuhaa.c(7): warning: #167-D: argument of type "unsigned char *" is incompatible with parameter of type "char *"
extern unsigned char *strcpy (unsigned char *s1, const unsigned char *s2);
Further.. The compiler documentation says that the basic type char defaults to unsigned char (compiler option --unsigned_chars). Why the warning? One of the MISRA rules states that the char type must always be declared signed or unsigned. There must be a good reason for this rule. I know I can suppress the warning with --diag_suppress, but I don't think it is a good idea either.