gcc: Compile and warning fixes