The following code works exactly as expected, but the compiler gives me incompatible pointer type warning. A cast will solve this, but I really don't understand why this should be a warning. A pointer is an integer that is an address of a certain memory area, and in my example, v has got the address of d which is an integer and that seems all. Please help me understand this issue.
#include <stdio.h>
#include <stdlib.h>
int main(void) {
double *d;
void **v;
d = malloc(sizeof(double));
*d = 1.1;
printf("%.1f\n", *d);
v = &d;
*(double *)*v = 2.2;
printf("%.1f\n", *d);
return 0;
}