Fix (some) warnings about implicit uint/int conversions
Change-Id: I0a6ac7476417c7158163e1f58d4f2ba5fa25f1e5