According to the ISO C Standard (6.3.16.1), a pointer can only be assigned to another pointer if "both operands are pointers to qualified or unqualified versions of compatible types, and the type pointed to by the left has all of the qualifiers of the type pointed to by the right". I got that warning in my static analyses tool, But I am not sure if there is a real problem or not. Because as you can see at the code below, that pointer will be passed to function that has "const" qualifier in it's prototype
int main() { static volatile const signed int batu[5] = {1,2,3,4,5}; unsigned int x = 5; func(x, (signed int *) batu); } signed int func(unsigned int p1, volatile const signed int *p2) { return 0; }
6.3.16, less a.1in the standard. What ever you use as reference is not ISO9899.6.5.16.1/1(C99)