Add -Wundef

and fix the warnings
5 files changed