Fix gcc varning about type conversion