What is the correct way to pass a pointer to 2D array?

What I do:

float X[length][length]

foo(&X);

Error:

warning: passing argument 1 of ‘foo_’ from incompatible pointer type

The program will still compile and run properly, but I hate these compilation errors.