Should I cast void** return in Visual Studio
问题 I compile some code with visual studio 9.0 (2008). The behave as expected, but when I allocate some 2D array with some hand made functions, Visual-Studio generates some C4133 warning: void ** alloc_2d(int w, int h, size_t type_size); void free_d2(void ** mem); int main (void) { float ** data; /* Here is generated a C4133 warning: "incompatible type from void ** to float **" */ data = alloc_2d(100, 100, sizeof **data); /* do things with data */ /* free data */ free_2d(data); return 0; } I