Fix gcc warning 'cast to pointer from integer of different size'