Fix several build warnings.