public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [common/cmd_ini.c:137]: (error) Uninitialized variable: line
Date: Thu, 06 Nov 2014 19:10:54 +0100	[thread overview]
Message-ID: <20141106181054.221F7382347@gemini.denx.de> (raw)
In-Reply-To: <20141106161600.GQ24724@bill-the-cat>

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.

  reply	other threads:[~2014-11-06 18:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-11-06 18:51     ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141106181054.221F7382347@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox