gcc doesn't like externs inside functions (warning: nested extern
declaration ofXXX)
Clean up remaining gcc warnings.