I am getting a warning on each function call for a signdness difference. The error is listed below:
../src/LCD_Driver.c:195:3: warning: pointer targets in passing argument 6 of 'button_build_hor' differ in signedness
../src/LCD_Driver.c:167:6: note: expected 'unsigned char *' but argument is of type 'char *'
How do I correct this as the number of warnings are overwelming.
It's a type mismatch warning. It's telling you that char* and unsigned char* are two different types and there could be a possible loss of data when passing between them. Usually, integral types are unsigned by default, but this may not be the case for you. What you'll have to do is change the type-specifier of the object you're passing to unsigned char*, or you could cast the type to unsigned char*, but I would only resort to that if I was desperate.
So if I understand, you are suggesting I need to change the "1" type specifier??? (sic)
You cannot change the type-specifier of a literal, nor can you change the value of one.
SrWalterR wrote:
So I am clear, the warning is on the
"1" (sic)
Add the U suffix to the 1. This will denote the literal as unsigned. However, judging by the use of integers and pointers, are you trying to access addresses within a memory region?