From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tools/imximage.c: Fix compiling warning
Date: Thu, 26 Sep 2013 17:24:33 +0200 [thread overview]
Message-ID: <524451B1.90102@denx.de> (raw)
In-Reply-To: <1379705084-12840-1-git-send-email-yorksun@freescale.com>
Hi York,
On 20/09/2013 21:24, York Sun wrote:
> Convert set_hdr_func(struct imx_header *imxhdr) to set_hdr_func(void)
> to get rid of the warning
>
> warning: ?imxhdr? is used uninitialized in this function
>
> Signed-off-by: York Sun <yorksun@freescale.com>
> ---
> tools/imximage.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/imximage.c b/tools/imximage.c
> index c87669b..32e4efe 100644
> --- a/tools/imximage.c
> +++ b/tools/imximage.c
> @@ -259,7 +259,7 @@ static void set_imx_hdr_v2(struct imx_header *imxhdr, uint32_t dcd_len,
> csf_ptr = &fhdr_v2->csf;
> }
>
> -static void set_hdr_func(struct imx_header *imxhdr)
> +static void set_hdr_func(void)
> {
> switch (imximage_version) {
> case IMXIMAGE_V1:
> @@ -358,7 +358,7 @@ static void parse_cfg_cmd(struct imx_header *imxhdr, int32_t cmd, char *token,
> exit(EXIT_FAILURE);
> }
> cmd_ver_first = 1;
> - set_hdr_func(imxhdr);
> + set_hdr_func();
> break;
> case CMD_BOOT_FROM:
> imximage_ivt_offset = get_table_entry_id(imximage_boot_offset,
> @@ -563,7 +563,7 @@ static void imximage_set_header(void *ptr, struct stat *sbuf, int ifd,
> /* 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);
> + set_hdr_func();
>
> /* Parse dcd configuration file */
> dcd_len = parse_cfg_file(imxhdr, params->imagename);
> @@ -631,7 +631,7 @@ static int imximage_generate(struct mkimage_params *params,
> /* 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);
> + set_hdr_func();
>
> /* Parse dcd configuration file */
> parse_cfg_file(&imximage_header, params->imagename);
>
Thanks for fixing this !
Acked-by: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano Babic
--
=====================================================================
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
=====================================================================
next prev parent reply other threads:[~2013-09-26 15:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 19:24 [U-Boot] [PATCH] tools/imximage.c: Fix compiling warning York Sun
2013-09-26 15:24 ` Stefano Babic [this message]
2013-09-27 12:03 ` Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=524451B1.90102@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.