144
a value of type <type> cannot be used to initialize an entity of type <type>
The initializing string for a fixed size character array is exactly as long as the array size, leaving no room for a terminating \0, for example:
char name[5] = "Hello";
The name array can hold up to 5 characters. "Hello" does not fit because C strings are always null-terminated (for example, "Hello\0"). The compiler reports:
Error: #144: a value of type "const char [6]" cannot be used to initialize an entity of type "char [5]"
A similar error is also raised if there is an implicit cast of non-zero int to pointer.
For example:
void foo_func( void )
{
char *foo=1;
}
results in the message:
#144: a value of type "int" cannot be used to initialize an entity of type "char *"
For the cast, this error can be suppressed with the use of the --loose_implicit_cast switch.