I\'m getting some strange warnings about this code:
typedef double mat4[4][4];
void mprod4(mat4 r, const mat4 a, const mat4 b)
{
/* yes, function is empty *
To practically solve this, one could use a struct, and the change of double[4][4] into the a-bit-awkward double (*)[4] is avoided, and constness also works intuitively — while the same amount of memory is used:
struct mat4 {
double m[4][4];
};
void myfunc(struct mat4 *r, const struct mat4 *a, const struct mat4 *b)
{
}
int main(void)
{
struct mat4 mr, ma, mb;
myfunc(&mr, &ma, &mb);
}