Fix warnings from variable declartions inside switch/case.

Also #ifdef out disabled code. It's cleaner not the declare
if we're going to comment out the use.