Skip to contentSkip to conversation

board/samsung/universal_c210/universal.c: Fix build warning

PATCH New Anatolij Gustschin 4 participants 6 messages Dec 19, 2011 – Dec 20, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board/samsung/universal_c210/universal.c: Fix build warning

Fix:
universal.c: In function 's5pc210_phy_control':
universal.c:273:7: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]

Cc Lukasz Majewski <[email protected]>
Cc Minkyu Kang <[email protected]>
---
 board/samsung/universal_c210/universal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
board/samsung/universal_c210/universal.c +1 -1
index 8393e4f..d0ff834 100644
@@ -260,7 +260,7 @@ int board_mmc_init(bd_t *bis)
 #ifdef CONFIG_USB_GADGET
 static int s5pc210_phy_control(int on)
 {
-	int ret;
+	int ret = 0;
 	struct pmic *p = get_pmic();
 
 	if (pmic_probe(p))
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 board/samsung/universal_c210/universal.c: Fix build warning

Quoted 18 lines

Fix:
universal.c: In function 's5pc210_phy_control':
universal.c:273:7: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]

Cc Lukasz Majewski <[email protected]>
Cc Minkyu Kang <[email protected]>
---
 board/samsung/universal_c210/universal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/board/samsung/universal_c210/universal.c index 8393e4f..d0ff834 100644 --- a/board/samsung/universal_c210/universal.c +++ b/board/samsung/universal_c210/universal.c

board/samsung/universal_c210/universal.c int board_mmc_init(bd_t *bis) · line 266

Quoted 8 lines
board/samsung/universal_c210/universal.c +1 -1
@@ -260,7 +260,7 @@ int board_mmc_init(bd_t *bis)
 #ifdef CONFIG_USB_GADGET
 static int s5pc210_phy_control(int on)
 {
-	int ret;
+	int ret = 0;
 	struct pmic *p = get_pmic();
 
 	if (pmic_probe(p))

Hi Anatolij,

Thank you for pointing me out about the new compiler version.

I've just realized, that I'm still using:
gcc version 4.4.1 (Sourcery G++ Lite 2009q3-68)

My question is about the GCC 4.6 version.
Is it a Codesourcery (Mentor Graphisc), ptxdist Oselas Toolchain, buildroot (uClibc), linaro, ELDK or a vanilla GCC 4.6 build from source with custom paramters?

Signature · 6 lines
Best regards,

Lukasz Majewski

Samsung Poland R&D Center
Platform Group
#2 lore raw

PATCH 1/1 board/samsung/universal_c210/universal.c: Fix build warning

Hi all,

On Mon, 19 Dec 2011 16:00:21 +0100
Lukasz Majewski <[email protected]> wrote:
...

Quoted 18 lines

board/samsung/universal_c210/universal.c int board_mmc_init(bd_t *bis) · line 266

Quoted 13 lines
(quoted diff) +0 -0

b/board/samsung/universal_c210/universal.c index 8393e4f..d0ff834 100644 --- a/board/samsung/universal_c210/universal.c +++ b/board/samsung/universal_c210/universal.c

board/samsung/universal_c210/universal.c +1 -1
@@ -260,7 +260,7 @@ int board_mmc_init(bd_t *bis)
 #ifdef CONFIG_USB_GADGET
 static int s5pc210_phy_control(int on)
 {
-	int ret;
+	int ret = 0;
 	struct pmic *p = get_pmic();
 
 	if (pmic_probe(p))

Hi Anatolij,

Thank you for pointing me out about the new compiler version.

Quoted 7 lines

I've just realized, that I'm still using:
gcc version 4.4.1 (Sourcery G++ Lite 2009q3-68)

My question is about the GCC 4.6 version.
Is it a Codesourcery (Mentor Graphisc), ptxdist Oselas Toolchain, buildroot (uClibc), linaro, ELDK or a vanilla GCC 4.6 build from source with custom paramters?

I used GCC version 4.2.2 from ELDK 4.2 and GCC version 4.6.1 20110627 from ELDK 5.1 and see this warning with both.

For another patch fixing warnings for s3c_udc_otg driver I also used same GCC versions, but I see the warnings only with GCC 4.6.1 from ELDK 5.1. GCC 4.2.2 from ELDK 4.2 didn't generate any warning when building s3c_udc_otg driver.

Thanks,
Anatolij

#3 lore raw

PATCH 1/1 board/samsung/universal_c210/universal.c: Fix build warning

Dear Lukasz,

Quoted 3 lines · In message <20111219161828.7495c109@wker> Anatolij Gustschin wrote:

I used GCC version 4.2.2 from ELDK 4.2 and GCC version 4.6.1 20110627 from ELDK 5.1 and see this warning with both.

Note: ELDK 5.1 is based on Yocto 1.1 (edison-6.0 release tag), plus some fixes for ARM related GCC issues. See
http://www.denx.de/wiki/ELDK-5

Best regards,

Wolfgang Denk

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-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All he had was nothing, but that was something, and now it  had  been
taken away.                             - Terry Pratchett, _Sourcery_
#4 lore raw

PATCH 1/1 board/samsung/universal_c210/universal.c: Fix build warning

In reply to Anatolij Gustschin

Dear Remy Bohmer,

Quoted 24 lines · Anatolij Gustschin

Fix:
universal.c: In function 's5pc210_phy_control':
universal.c:273:7: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]

Cc Lukasz Majewski <[email protected]>
Cc Minkyu Kang <[email protected]>

---
?board/samsung/universal_c210/universal.c | ? ?2 +- ?1 files changed, 1 insertions(+), 1 deletions(-)

board/samsung/universal_c210/universal.c +0 -0
index 8393e4f..d0ff834 100644
@@ -260,7 +260,7 @@ int board_mmc_init(bd_t *bis)

?#ifdef CONFIG_USB_GADGET
?static int s5pc210_phy_control(int on)
?{
- ? ? ? int ret;
+ ? ? ? int ret = 0;
? ? ? ?struct pmic *p = get_pmic();

Quoted 4 lines

? ? ? ?if (pmic_probe(p))
--
1.7.5.4

Thanks
Minkyu Kang

Signature · 2 lines
from. prom.
www.promsoft.net
#5 lore raw

PATCH 1/1 board/samsung/universal_c210/universal.c: Fix build warning

In reply to Anatolij Gustschin

Dear Anatolij Gustschin,

Quoted 11 lines · In message <[email protected]> you wrote:

Fix:
universal.c: In function 's5pc210_phy_control':
universal.c:273:7: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]

Cc Lukasz Majewski <[email protected]>
Cc Minkyu Kang <[email protected]>
---
 board/samsung/universal_c210/universal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 7 lines
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
The shortest unit of time in the multiverse is the News York  Second,
defined  as  the  period  of  time between the traffic lights turning
green and the cab behind you honking.
                                - Terry Pratchett, _Lords and Ladies_