From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Wed, 11 Sep 2013 08:20:23 -0700 Subject: [U-Boot] [PATCH v4 5/7] tools: add padding of data image file for imximage In-Reply-To: <5230180D.2060203@denx.de> References: <1376931802-24994-6-git-send-email-sbabic@denx.de> <1377616660-31849-1-git-send-email-sbabic@denx.de> <522F99CD.4040203@freescale.com> <5230180D.2060203@denx.de> Message-ID: <52308A37.3060300@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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