* [U-Boot] [common/cmd_ini.c:137]: (error) Uninitialized variable: line
@ 2014-11-06 12:32 Wolfgang Denk
2014-11-06 16:16 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2014-11-06 12:32 UTC (permalink / raw)
To: u-boot
Hello,
cppcheck reports:
[common/cmd_ini.c:137]: (error) Uninitialized variable: line
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
365 Days of drinking Lo-Cal beer. = 1 Lite-year
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [common/cmd_ini.c:137]: (error) Uninitialized variable: line
2014-11-06 12:32 [U-Boot] [common/cmd_ini.c:137]: (error) Uninitialized variable: line Wolfgang Denk
@ 2014-11-06 16:16 ` Tom Rini
2014-11-06 18:10 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2014-11-06 16:16 UTC (permalink / raw)
To: u-boot
On Thu, Nov 06, 2014 at 01:32:59PM +0100, Wolfgang Denk wrote:
> Hello,
>
> cppcheck reports:
>
> [common/cmd_ini.c:137]: (error) Uninitialized variable: line
>
> can you please have a look? Thanks!
trini at bill-the-cat:~/work/u-boot/u-boot-ti (master)$ cppcheck --version
Cppcheck 1.52
trini at bill-the-cat:~/work/u-boot/u-boot-ti (master)$ cppcheck --force
--inline-suppr common/cmd_ini.c
Checking common/cmd_ini.c...
Checking common/cmd_ini.c: CONFIG_INI_ALLOW_MULTILINE...
Checking common/cmd_ini.c: CONFIG_INI_CASE_INSENSITIVE...
Checking common/cmd_ini.c: CONFIG_INI_MAX_LINE...
Checking common/cmd_ini.c: CONFIG_INI_MAX_NAME...
Checking common/cmd_ini.c: CONFIG_INI_MAX_SECTION...
And I don't see anything. I did this since manually inspecting things
and the code looks correct here but I could see cppcheck failing to
figure it out (and I could see the code being optimized, we pass line as
a pointer but then also return that back..).
--
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/34c13a86/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [common/cmd_ini.c:137]: (error) Uninitialized variable: line
2014-11-06 16:16 ` Tom Rini
@ 2014-11-06 18:10 ` Wolfgang Denk
2014-11-06 18:51 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2014-11-06 18:10 UTC (permalink / raw)
To: u-boot
Dear Tom,
In message <20141106161600.GQ24724@bill-the-cat> you wrote:
>
> trini at bill-the-cat:~/work/u-boot/u-boot-ti (master)$ cppcheck --version
> Cppcheck 1.52
-> cppcheck --version
Cppcheck 1.63
> trini at bill-the-cat:~/work/u-boot/u-boot-ti (master)$ cppcheck --force --inline-suppr common/cmd_ini.c
> Checking common/cmd_ini.c...
> Checking common/cmd_ini.c: CONFIG_INI_ALLOW_MULTILINE...
> Checking common/cmd_ini.c: CONFIG_INI_CASE_INSENSITIVE...
> Checking common/cmd_ini.c: CONFIG_INI_MAX_LINE...
> Checking common/cmd_ini.c: CONFIG_INI_MAX_NAME...
> Checking common/cmd_ini.c: CONFIG_INI_MAX_SECTION...
-> cppcheck --force --inline-suppr common/cmd_ini.c
Checking common/cmd_ini.c...
Checking common/cmd_ini.c: CONFIG_INI_ALLOW_MULTILINE...
Checking common/cmd_ini.c: CONFIG_INI_CASE_INSENSITIVE...
Checking common/cmd_ini.c: CONFIG_INI_MAX_LINE...
[common/cmd_ini.c:137]: (error) Uninitialized variable: line
Checking common/cmd_ini.c: CONFIG_INI_MAX_NAME...
Checking common/cmd_ini.c: CONFIG_INI_MAX_SECTION...
Same result with Cppcheck 1.67
> And I don't see anything. I did this since manually inspecting things
> and the code looks correct here but I could see cppcheck failing to
> figure it out (and I could see the code being optimized, we pass line as
> a pointer but then also return that back..).
To me it looks as if it complained due to possibly incorrect
CONFIG_INI_MAX_LINE settings?
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
Put your Nose to the Grindstone!
-- Amalgamated Plastic Surgeons and Toolmakers, Ltd.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [common/cmd_ini.c:137]: (error) Uninitialized variable: line
2014-11-06 18:10 ` Wolfgang Denk
@ 2014-11-06 18:51 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2014-11-06 18:51 UTC (permalink / raw)
To: u-boot
On Thu, Nov 06, 2014 at 07:10:54PM +0100, Wolfgang Denk wrote:
> Dear Tom,
>
> In message <20141106161600.GQ24724@bill-the-cat> you wrote:
> >
> > trini at bill-the-cat:~/work/u-boot/u-boot-ti (master)$ cppcheck --version
> > Cppcheck 1.52
>
> -> cppcheck --version
> Cppcheck 1.63
Ah, OK.
> > trini at bill-the-cat:~/work/u-boot/u-boot-ti (master)$ cppcheck --force --inline-suppr common/cmd_ini.c
> > Checking common/cmd_ini.c...
> > Checking common/cmd_ini.c: CONFIG_INI_ALLOW_MULTILINE...
> > Checking common/cmd_ini.c: CONFIG_INI_CASE_INSENSITIVE...
> > Checking common/cmd_ini.c: CONFIG_INI_MAX_LINE...
> > Checking common/cmd_ini.c: CONFIG_INI_MAX_NAME...
> > Checking common/cmd_ini.c: CONFIG_INI_MAX_SECTION...
>
> -> cppcheck --force --inline-suppr common/cmd_ini.c
> Checking common/cmd_ini.c...
> Checking common/cmd_ini.c: CONFIG_INI_ALLOW_MULTILINE...
> Checking common/cmd_ini.c: CONFIG_INI_CASE_INSENSITIVE...
> Checking common/cmd_ini.c: CONFIG_INI_MAX_LINE...
> [common/cmd_ini.c:137]: (error) Uninitialized variable: line
> Checking common/cmd_ini.c: CONFIG_INI_MAX_NAME...
> Checking common/cmd_ini.c: CONFIG_INI_MAX_SECTION...
>
> Same result with Cppcheck 1.67
>
> > And I don't see anything. I did this since manually inspecting things
> > and the code looks correct here but I could see cppcheck failing to
> > figure it out (and I could see the code being optimized, we pass line as
> > a pointer but then also return that back..).
>
> To me it looks as if it complained due to possibly incorrect
> CONFIG_INI_MAX_LINE settings?
Could be, but that'd be a compile-time failure if it's defined but not
to a numerical value.
--
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/e3c3087b/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-06 18:51 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:32 [U-Boot] [common/cmd_ini.c:137]: (error) Uninitialized variable: line Wolfgang Denk
2014-11-06 16:16 ` Tom Rini
2014-11-06 18:10 ` Wolfgang Denk
2014-11-06 18:51 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox