[U-Boot] [PATCH] net: rtl8169: Build warning fixes for 64-bit

Joe Hershberger joe.hershberger at gmail.com
Thu Oct 29 20:32:00 CET 2015


On Fri, Oct 2, 2015 at 6:44 PM, Stephen Warren <swarren at wwwdotorg.org> wrote:
> From: Stephen Warren <swarren at nvidia.com>
>
> Casting from dev->priv to pci_dev_t changes the value's size on a 64-bit
> system. This causes the compiler to complain about casting a pointer to an
> integer of a different (smaller) size. To avoid this, cast to an integer
> of matching size first, then perform an int->int cast to perform the size
> change. This signals explicitly that we do want to change the size, and
> avoids the compiler warning. This is legitimate since we know the pointer
> actually stores a small integer, not a pointer value.
>
> Signed-off-by: Stephen Warren <swarren at nvidia.com>

Applied to u-boot-net/master, thanks!
-Joe


More information about the U-Boot mailing list