This commit also takes care of all the warnings that didn't appear with CMake. I decided to switch to C99 cause my code clearly wasn't C89 compliant.