* [U-Boot] [net/eth.c:64]: (error) Uninitialized variable: skip_state
@ 2014-11-06 12:37 Wolfgang Denk
2014-11-06 16:46 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2014-11-06 12:37 UTC (permalink / raw)
To: u-boot
Hello,
cppcheck reports:
[net/eth.c:64]: (error) Uninitialized variable: skip_state
can you please have a look? Thanks!
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
What we anticipate seldom occurs; what we least expect generally
happens. - Bengamin Disraeli
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [net/eth.c:64]: (error) Uninitialized variable: skip_state
2014-11-06 12:37 [U-Boot] [net/eth.c:64]: (error) Uninitialized variable: skip_state Wolfgang Denk
@ 2014-11-06 16:46 ` Tom Rini
2014-11-06 18:12 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2014-11-06 16:46 UTC (permalink / raw)
To: u-boot
On Thu, Nov 06, 2014 at 01:37:23PM +0100, Wolfgang Denk wrote:
> Hello,
>
> cppcheck reports:
>
> [net/eth.c:64]: (error) Uninitialized variable: skip_state
>
> can you please have a look? Thanks!
Dense code, like cmd_ini.c my cppcheck is OK and looking at the code
manually I think it's fine too:
return ((skip_state = getenv(enetvar)) != NULL);
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141106/735805ac/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [net/eth.c:64]: (error) Uninitialized variable: skip_state
2014-11-06 16:46 ` Tom Rini
@ 2014-11-06 18:12 ` Wolfgang Denk
2014-11-06 18:52 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2014-11-06 18:12 UTC (permalink / raw)
To: u-boot
Dear Tom Rini,
In message <20141106164628.GR24724@bill-the-cat> you wrote:
>
> > [net/eth.c:64]: (error) Uninitialized variable: skip_state
>
> Dense code, like cmd_ini.c my cppcheck is OK and looking at the code
> manually I think it's fine too:
> return ((skip_state = getenv(enetvar)) != NULL);
Looks OK to me, too, but recent versions of cppcheck spew this error.
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
"He was so narrow minded he could see through a keyhole with both
eyes ..."
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [net/eth.c:64]: (error) Uninitialized variable: skip_state
2014-11-06 18:12 ` Wolfgang Denk
@ 2014-11-06 18:52 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2014-11-06 18:52 UTC (permalink / raw)
To: u-boot
On Thu, Nov 06, 2014 at 07:12:55PM +0100, Wolfgang Denk wrote:
> Dear Tom Rini,
>
> In message <20141106164628.GR24724@bill-the-cat> you wrote:
> >
> > > [net/eth.c:64]: (error) Uninitialized variable: skip_state
> >
> > Dense code, like cmd_ini.c my cppcheck is OK and looking at the code
> > manually I think it's fine too:
> > return ((skip_state = getenv(enetvar)) != NULL);
>
> Looks OK to me, too, but recent versions of cppcheck spew this error.
File a bug back with them then? I do like what cppcheck is doing 'tho,
I poked some of the sandbox ones as well and they're real.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141106/1425dedb/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-06 18:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06 12:37 [U-Boot] [net/eth.c:64]: (error) Uninitialized variable: skip_state Wolfgang Denk
2014-11-06 16:46 ` Tom Rini
2014-11-06 18:12 ` Wolfgang Denk
2014-11-06 18:52 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox