Code changes to handle some warnings