* [PATCH] parisc: silence uninitialized variable warning in dbl_to_sgl_fcnvff()
@ 2018-03-06 10:06 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2018-03-06 10:06 UTC (permalink / raw)
To: kernel-janitors
Smatch warns that is_tiny can be used uninitialized:
arch/parisc/math-emu/fcnvff.c:297 dbl_to_sgl_fcnvff()
error: uninitialized symbol 'is_tiny'.
This code is very old so that suggests the bug doesn't have a huge
affect in real life. But I've read the code and it seems like a
reasonable warning. Either way it should be harmless to initialize it
to false and silence the static checker warning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/arch/parisc/math-emu/fcnvff.c b/arch/parisc/math-emu/fcnvff.c
index 76c063f7d17c..f9357d9d4cb1 100644
--- a/arch/parisc/math-emu/fcnvff.c
+++ b/arch/parisc/math-emu/fcnvff.c
@@ -148,7 +148,7 @@ dbl_to_sgl_fcnvff(
register int src_exponent, dest_exponent, dest_mantissa;
register boolean inexact = FALSE, guardbit = FALSE, stickybit = FALSE;
register boolean lsb_odd = FALSE;
- boolean is_tiny;
+ boolean is_tiny = FALSE;
Dbl_copyfromptr(srcptr,srcp1,srcp2);
src_exponent = Dbl_exponent(srcp1);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-06 10:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-06 10:06 [PATCH] parisc: silence uninitialized variable warning in dbl_to_sgl_fcnvff() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox