Hi York,

On 11/09/2013 00:14, York Sun wrote:

>> +static int imximage_generate(struct mkimage_params *params,
>> +    struct image_type_params *tparams)
>> +{
>> +    struct imx_header *imxhdr;
>> +    size_t alloc_len;
>> +    struct stat sbuf;
>> +    char *datafile = params->datafile;
>> +    uint32_t pad_len;
>> +
>> +    memset(&imximage_header, 0, sizeof(imximage_header));
>> +
>> +    /*
>> +     * In order to not change the old imx cfg file
>> +     * by adding VERSION command into it, here need
>> +     * set up function ptr group to V1 by default.
>> +     */
>> +    imximage_version = IMXIMAGE_V1;
>> +    /* Be able to detect if the cfg file has no BOOT_FROM tag */
>> +    imximage_ivt_offset = FLASH_OFFSET_UNDEFINED;
>> +    imximage_csf_size = 0;
>> +    set_hdr_func(imxhdr);
> 
> Doesn't this line has compiling warning for you?
> 
> imximage.c: In function ‘imximage_generate’:
> imximage.c:634: warning: ‘imxhdr’ is used uninitialized in this function

I see the issue, but I hadn't warnings, gcc version 4.6.3 (Ubuntu/Linaro
4.6.3-1ubuntu5). Which gcc version do you have ?

Anyway, set_hdr_func() does not use parameters anymore. It can be
converted to set_hdr_func(void) and we get rid of warnings.

Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to