tools/imximage.c: Fix compiling warning
PATCH 1/1 tools/imximage.c: Fix compiling warning
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
--- tools/imximage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tools/imximage.c +4 -4
@@ -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);
Signature · 1 line
1.7.9.5
PATCH 1/1 tools/imximage.c: Fix compiling warning
Hi York,
Quoted 43 lines · York Sun
Convert
set_hdr_func(struct imx_header *imxhdr)toset_hdr_func(void)to get rid of the warningwarning: ?imxhdr? is used uninitialized in this function
Signed-off-by York Sun <[email protected]>--- tools/imximage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)tools/imximage.c +3
-3@@ -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);
tools/imximage.c static int imximage_generate(struct mkimage_params *params, · line 637
Quoted 8 lines
tools/imximage.c +1
-1@@ -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 !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/1 tools/imximage.c: Fix compiling warning
In reply to York SunQuoted 7 lines · York Sun
Convert
set_hdr_func(struct imx_header *imxhdr)toset_hdr_func(void)to get rid of the warningwarning: ?imxhdr? is used uninitialized in this function
Signed-off-by York Sun <[email protected]>---
Applied to u-boot-imx (fix), thanks!
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================