I do some malloc and afterwards I want to check wheather the result from malloc is in my RAM like this:
char (*message)[];
message = malloc(data_index);
if(message != NULL && message >= 0x20000000 && message < 0x20030000){
//do something
}
It works, but I get a warning: comparrison between pointer and integer. I would like th get rid of this warning, but how? The warning disappears, when I cast the integer to char, but this is a false solution, obviously.
if(message >= (char)0x20000000) {
I also tried to cast it to a double pointer, which I think is the right type, but the warning is still there.
if(message >= (char**)0x20000000) {
How do I get a woking if statement without a warning?