This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Define strings as unsigned

Hello,

I'm using a graphical Display and have a printf() Function which expects an unsigned char pointer: void LCD_DrawString(unsigned char* s);

using LCD_DrawString("Hello World"); generates a PC-Lint Warning because the constant string is treated as signed by default.

Is there a modifier in c to treat constants like that as unsigned by default like #define 1000U?

I'd like to avoid a cast each time I call this Function just to please Lint and on the other Hand I don't want to disable this check in Lint.

Regards,
Marcus

0