public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch: tile: kernel: unaligned.c:  Cleaning up uninitialized variables
@ 2014-05-31 23:00 Rickard Strandqvist
  2014-06-08  1:41 ` Chris Metcalf
  0 siblings, 1 reply; 3+ messages in thread
From: Rickard Strandqvist @ 2014-05-31 23:00 UTC (permalink / raw)
  To: Chris Metcalf, Rickard Strandqvist; +Cc: linux-kernel

There is a risk that the variable will be used without being initialized.

This was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 arch/tile/kernel/unaligned.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/tile/kernel/unaligned.c b/arch/tile/kernel/unaligned.c
index b030b4e..ce475dd 100644
--- a/arch/tile/kernel/unaligned.c
+++ b/arch/tile/kernel/unaligned.c
@@ -569,7 +569,7 @@ void jit_bundle_gen(struct pt_regs *regs, tilegx_bundle_bits bundle,
 	tilegx_bundle_bits bundle_2 = 0;
 	/* If bundle_2_enable = false, bundle_2 is fnop/nop operation. */
 	bool     bundle_2_enable = true;
-	uint64_t ra, rb, rd = -1, clob1, clob2, clob3;
+	uint64_t ra = 0, rb = 0, rd = -1, clob1 = 0, clob2 = 0, clob3 = 0;
 	/*
 	 * Indicate if the unalign access
 	 * instruction's registers hit with
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-08 17:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-31 23:00 [PATCH] arch: tile: kernel: unaligned.c: Cleaning up uninitialized variables Rickard Strandqvist
2014-06-08  1:41 ` Chris Metcalf
2014-06-08 17:17   ` Rickard Strandqvist

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox