
11 Sep
2013
11 Sep
'13
5:20 p.m.
On 09/11/2013 12:13 AM, Stefano Babic wrote:
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.
I have gcc version 4.6.2 and 4.7.2.
York