]> git.sur5r.net Git - u-boot/commitdiff
spl: Fix compiling warning on gunzip argument
authorYork Sun <york.sun@nxp.com>
Fri, 15 Sep 2017 15:21:13 +0000 (08:21 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 22 Sep 2017 11:40:04 +0000 (07:40 -0400)
common/spl/spl_fit.c:201:12: warning: passing argument 4 of ‘gunzip’
from incompatible pointer type [-Wincompatible-pointer-types]
       src, &length))

Signed-off-by: York Sun <york.sun@nxp.com>
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
CC: Jean-Jacques Hiblot <jjhiblot@ti.com>
common/spl/spl_fit.c

index 49ccf1c17bdaf56b429bfbf90fc21de82bfbaf58..32d9ee590122585273af4f31cd6476a21ea26aa1 100644 (file)
@@ -135,6 +135,7 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
        int offset;
        size_t length;
        int len;
+       ulong size;
        ulong load_addr, load_ptr;
        void *src;
        ulong overhead;
@@ -197,11 +198,13 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
            IS_ENABLED(CONFIG_SPL_GZIP)         &&
            image_comp == IH_COMP_GZIP          &&
            type == IH_TYPE_KERNEL) {
+               size = length;
                if (gunzip((void *)load_addr, CONFIG_SYS_BOOTM_LEN,
-                          src, &length)) {
+                          src, &size)) {
                        puts("Uncompressing error\n");
                        return -EIO;
                }
+               length = size;
        } else {
                memcpy((void *)load_addr, src, length);
        }