Removing warnings due to comparison between unsigned and signed integers