* [Query]: Regmap v3.8: Compilation Warning: regmap_read_debugfs()
@ 2013-02-20 7:53 Viresh Kumar
2013-02-20 12:14 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Viresh Kumar @ 2013-02-20 7:53 UTC (permalink / raw)
To: Mark Brown; +Cc: Lists linaro-kernel, Linux Kernel Mailing List
Hi Mark,
I am getting compilation warning while compiling v3.8
commit 19f949f52599ba7c3f67a5897ac6be14bfcb1200
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Mon Feb 18 15:58:34 2013 -0800
Linux 3.8
Warning:
CC drivers/base/regmap/regmap-debugfs.o
drivers/base/regmap/regmap-debugfs.c: In function ‘regmap_read_debugfs’:
drivers/base/regmap/regmap-debugfs.c:180:9: warning: ‘ret’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
I am unable to understand why this warning is coming and that too on
line 180 (as that doesn't use this variable). I can't see how this variable is
used uninitialized.
Toolchain i used:
arm-linux-gnueabihf-gcc (crosstool-NG
linaro-1.13.1-4.7-2012.12-20121214 - Linaro GCC 2012.12) 4.7.3
20121205 (prerelease)
--
viresh
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Query]: Regmap v3.8: Compilation Warning: regmap_read_debugfs()
2013-02-20 7:53 [Query]: Regmap v3.8: Compilation Warning: regmap_read_debugfs() Viresh Kumar
@ 2013-02-20 12:14 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-02-20 12:14 UTC (permalink / raw)
To: Viresh Kumar; +Cc: Lists linaro-kernel, Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 407 bytes --]
On Wed, Feb 20, 2013 at 01:23:09PM +0530, Viresh Kumar wrote:
> I am unable to understand why this warning is coming and that too on
> line 180 (as that doesn't use this variable). I can't see how this variable is
> used uninitialized.
The compiler isn't as smart about code flow analysis as it thinks it is,
the code is safe. There's a patch going to Linus this merge window
which shuts up the warning.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-20 12:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-20 7:53 [Query]: Regmap v3.8: Compilation Warning: regmap_read_debugfs() Viresh Kumar
2013-02-20 12:14 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).