Patchwork [U-Boot,10/13] common/cmd_universe.c: Fix GCC 4.6 build warning

login
register
mail settings
Submitter Wolfgang Denk
Date Nov. 9, 2011, 7:29 p.m.
Message ID <1320866946-28235-10-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/124667/
State Accepted
Commit e4119560cf5287fdfef3c0ad1f11bc45f77f0c0f
Headers show

Comments

Wolfgang Denk - Nov. 9, 2011, 7:29 p.m.
Fix:
cmd_universe.c: In function 'universe_init':
cmd_universe.c:49:17: warning: variable 'lastError' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 common/cmd_universe.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
Wolfgang Denk - Nov. 16, 2011, 8:04 p.m.
Dear Wolfgang Denk,

In message <1320866946-28235-10-git-send-email-wd@denx.de> you wrote:
> Fix:
> cmd_universe.c: In function 'universe_init':
> cmd_universe.c:49:17: warning: variable 'lastError' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  common/cmd_universe.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/common/cmd_universe.c b/common/cmd_universe.c
index a86a574..58384f3 100644
--- a/common/cmd_universe.c
+++ b/common/cmd_universe.c
@@ -46,7 +46,7 @@  static UNI_DEV   *dev;
 
 int universe_init(void)
 {
-	int j, result, lastError = 0;
+	int j, result;
 	pci_dev_t busdevfn;
 	unsigned int val;
 
@@ -126,8 +126,6 @@  int universe_init(void)
  break_30:
 	free(dev);
  break_20:
-	lastError = result;
-
 	return result;
 }