Various build warning fixes