Fix GCC warnings and error.