Clean up some warnings and remove the need for -fpermissive