On Mon, May 7, 2018 at 10:27 AM, Su Hang <suhan...@mails.ucas.ac.cn> wrote: >> > + size_t total_size = 0; >> >> Please use int instead of size_t (see above for reasons). > I have question here: > Since `EXT_LINEAR_ADDR_RECORD` supports 32 bit addressing (up to 4GiB), is > `int` > big enough for this type? > The same question will happen to other similar cases. > Or should I use `long long` instead of `int`?
There is no way of fixing that without modifying hw/arm/boot.c to use a different type for kernel_size. It looks like the actual size is never used in that file. A bool would be enough to indicate whether loading the kernel succeeded. Then the Intel .hex file parser code could be adjusted to either just return bool or to use an appropriate type as you suggested. Stefan