All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] RAMDISK: Fix unused variable issue caused by raw rd support
@ 2012-03-30 21:19 Marek Vasut
  2012-03-30 21:53 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2012-03-30 21:19 UTC (permalink / raw)
  To: u-boot

image.c: In function ?boot_get_ramdisk?:
image.c:800:8: warning: unused variable ?end? [-Wunused-variable]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
---
 common/image.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/common/image.c b/common/image.c
index 103e0e6..342b315 100644
--- a/common/image.c
+++ b/common/image.c
@@ -797,7 +797,9 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
 	ulong rd_addr, rd_load;
 	ulong rd_data, rd_len;
 	const image_header_t *rd_hdr;
+#ifdef CONFIG_SUPPORT_RAW_INITRD
 	char *end;
+#endif
 #if defined(CONFIG_FIT)
 	void		*fit_hdr;
 	const char	*fit_uname_config = NULL;
-- 
1.7.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] RAMDISK: Fix unused variable issue caused by raw rd support
  2012-03-30 21:19 [U-Boot] [PATCH] RAMDISK: Fix unused variable issue caused by raw rd support Marek Vasut
@ 2012-03-30 21:53 ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2012-03-30 21:53 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1333142350-27117-1-git-send-email-marex@denx.de> you wrote:
> image.c: In function ?boot_get_ramdisk?:
> image.c:800:8: warning: unused variable ?end? [-Wunused-variable]
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Wolfgang Denk <wd@denx.de>
> ---
>  common/image.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Applied, thanks.

But please don't send base64 encoded messages, because patchwork barfs
on these:

-> pwapply ~/Mail/U-Boot/13909
Applying patch #149753 to current directory
Description: [U-Boot] RAMDISK: Fix unused variable issue caused by raw rd support
Traceback (most recent call last):
  File "/home/wd/bin/pwclient", line 466, in <module>
    main()
  File "/home/wd/bin/pwclient", line 449, in main
    action_apply(rpc, patch_id)
  File "/home/wd/bin/pwclient", line 264, in action_apply
    proc.communicate(s)
  File "/usr/lib64/python2.7/subprocess.py", line 737, in communicate
    self.stdin.write(input)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 406: ordinal not in range(128)


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Do not underestimate the value of print statements for debugging.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] RAMDISK: Fix unused variable issue caused by raw rd support
  2012-03-30 21:22 Marek Vasut
@ 2012-03-30 21:49 ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2012-03-30 21:49 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1333142566-30899-1-git-send-email-marex@denx.de> you wrote:
> image.c: In function ?boot_get_ramdisk?:
> image.c:800:8: warning: unused variable ?end? [-Wunused-variable]
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
>  common/image.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/common/image.c b/common/image.c
> index 103e0e6..d55d448 100644
> --- a/common/image.c
> +++ b/common/image.c
> @@ -797,7 +797,6 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
>  	ulong rd_addr, rd_load;
>  	ulong rd_data, rd_len;
>  	const image_header_t *rd_hdr;
> -	char *end;
>  #if defined(CONFIG_FIT)
>  	void		*fit_hdr;
>  	const char	*fit_uname_config = NULL;
> @@ -996,6 +995,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
>  #endif
>  		default:
>  #ifdef CONFIG_SUPPORT_RAW_INITRD
> +			char *end;
>  			if (argc >= 3 && (end = strchr(argv[2], ':'))) {

This works only with CONFIG_SUPPORT_RAW_INITRD undefined.

Otherwise you get:

image.c: In function 'boot_get_ramdisk':
image.c:1000: error: expected expression before 'char'
image.c:1001: error: 'end' undeclared (first use in this function)
image.c:1001: error: (Each undeclared identifier is reported only once
image.c:1001: error: for each function it appears in.)


You need braces to start a new block.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"In the face of entropy and nothingness, you kind of have to  pretend
it's  not  there  if  you  want  to  keep writing good code."
- Karl Lehenbauer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] RAMDISK: Fix unused variable issue caused by raw rd support
@ 2012-03-30 21:22 Marek Vasut
  2012-03-30 21:49 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2012-03-30 21:22 UTC (permalink / raw)
  To: u-boot

image.c: In function ?boot_get_ramdisk?:
image.c:800:8: warning: unused variable ?end? [-Wunused-variable]

Signed-off-by: Marek Vasut <marex@denx.de>
---
 common/image.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/image.c b/common/image.c
index 103e0e6..d55d448 100644
--- a/common/image.c
+++ b/common/image.c
@@ -797,7 +797,6 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
 	ulong rd_addr, rd_load;
 	ulong rd_data, rd_len;
 	const image_header_t *rd_hdr;
-	char *end;
 #if defined(CONFIG_FIT)
 	void		*fit_hdr;
 	const char	*fit_uname_config = NULL;
@@ -996,6 +995,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
 #endif
 		default:
 #ifdef CONFIG_SUPPORT_RAW_INITRD
+			char *end;
 			if (argc >= 3 && (end = strchr(argv[2], ':'))) {
 				rd_len = simple_strtoul(++end, NULL, 16);
 				rd_data = rd_addr;
-- 
1.7.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-30 21:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-30 21:19 [U-Boot] [PATCH] RAMDISK: Fix unused variable issue caused by raw rd support Marek Vasut
2012-03-30 21:53 ` Wolfgang Denk
2012-03-30 21:22 Marek Vasut
2012-03-30 21:49 ` Wolfgang Denk

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.