Fix GCC compiler flags and warnings.