[U-Boot] drivers/core/read.c:64:44: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Heinrich Schuchardt xypron.glpk at gmx.de
Thu Sep 21 11:11:10 UTC 2017


Hello Simon,

sandbox_defconfig has

arch/sandbox/include/asm/types.h:60: typedef u32 phys_addr_t;

even if building on a 64bit machine.

This results in a warning

  CC      drivers/demo/demo-uclass.o
drivers/core/read.c: In function ‘dev_read_addr_ptr’:
drivers/core/read.c:64:44: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
  return (addr == FDT_ADDR_T_NONE) ? NULL : (void *)addr;

Why don't we set phys_addr_t according to the host architecture?

Regards

Heinrich



More information about the U-Boot mailing list