charles-haynes get rid of build warnings, convert disabled code to use #if