Keil Logo Arm Logo

What the warning?

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Marius Cosa
Posted
8-May-2012 08:29 GMT
Toolset
ARM
New! What the warning?

I have this code

IAP_STATUS_CODE software_update_procedure(int8_t const *ap_folder_entry)

which calls

if (strncasecmp(ap_folder_entry + 8, IMAGES_NAME_EXTENSION, strlen(IMAGES_NAME_EXTENSION) ) == 0)

while

extern _ARMABI int strncasecmp(const char * /*s1*/, const char * /*s2*/, size_t /*n*/) __attribute__((__nonnull__(1,2)));

which generates this warning:

src\software_update.c(16): warning:  #167-D: argument of type "const int8_t *" is incompatible with parameter of type "const char *"

but the type int8_t is defined like this

typedef   signed          char int8_t;

checking "Plain Char is Signed" does not help.

Read-Only
Author
Hans-Bernhard Broeker
Posted
8-May-2012 21:48 GMT
Toolset
ARM
New! RE: What the warning?

Yes. So what?

Plain 'char' is a type distinct from both signed char and unsigned char. Even if plain char is signed, it's not the same as signed char.

As far as pointers to each are concerned, that renders them incompatible.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.