I tried that, but it didn't work. I still get the following cc error:
cc: Info: csg.c, line 4201: In this statement, the return type for intrinsic "strlen" is being changed from "size_t" to "int". (intrinsicint)
filename[(int)strlen(filename) - 2] = NULL;