fixing compiler warnings (cast from pointer to integer of different size)