[PATCH 15/21] thermal: cooling: avoid uninitialied used gcc warning

Arnd Bergmann arnd at arndb.de
Thu Apr 25 17:09:03 EDT 2013


On Thursday 25 April 2013, edubezval at gmail.com wrote:
> Rui has merged a patch that removes this bogus compiler warning:
> http://git.kernel.org/cgit/linux/kernel/git/rzhang/linux.git/commit/?h=next&id=4469b99743d296e24aefc5f8ed7df1bc9cfbbac8
> 
> Though, as not as elegant as your patch, it does the trick. :-)

Ok, works for me.

Looking at the patch however tells me that it has the potential to hide real
bugs if the code is ever changed to actually do an uninitialized access.
It's not very likely in this case, but I generally recommend not to add
any variables at declaration time unless the initialization is to a
meaningful value that the code later uses.

	Arnd



More information about the linux-arm-kernel mailing list