Fix various warnings after increasing compiler warn levels.