Fix various build warnings.