fs: usbifs: Fix warning in ubifs
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Tue, 30 May 2017 12:29:06 +0000 (14:29 +0200)
committerHeiko Schocher <hs@denx.de>
Tue, 6 Jun 2017 05:11:12 +0000 (07:11 +0200)
This patch fixes the below warning by typecasting it properly
fs/ubifs/ubifs.c: In function 'ubifs_load':
fs/ubifs/ubifs.c:942:29: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
  err = ubifs_read(filename, (void *)addr, 0, size, &actread);

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
fs/ubifs/ubifs.c

index cc397d605b0e03b1901f96cbb88cb62411002004..db29489eca7517c4a21151fcd91dbdc53b270dfc 100644 (file)
@@ -939,7 +939,7 @@ int ubifs_load(char *filename, u32 addr, u32 size)
 
        printf("Loading file '%s' to addr 0x%08x...\n", filename, addr);
 
-       err = ubifs_read(filename, (void *)addr, 0, size, &actread);
+       err = ubifs_read(filename, (void *)(uintptr_t)addr, 0, size, &actread);
        if (err == 0) {
                setenv_hex("filesize", actread);
                printf("Done\n");