Add cast for conversion when type isn't unsigned.