From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 6 Nov 2014 13:51:55 -0500 Subject: [U-Boot] [common/cmd_ini.c:137]: (error) Uninitialized variable: line In-Reply-To: <20141106181054.221F7382347@gemini.denx.de> References: <20141106123259.40CD038334C@gemini.denx.de> <20141106161600.GQ24724@bill-the-cat> <20141106181054.221F7382347@gemini.denx.de> Message-ID: <20141106185155.GS24724@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: