Fixes warnings about casts in C code.