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