diff mbox

parisc: avoid unitialized variable warning in pa_memcpy()

Message ID 20130227222115.GA2921@p100.box (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Helge Deller Feb. 27, 2013, 10:21 p.m. UTC
commit eed0220c5b2f33e4da2e9ba207c798c1bdebe500
Author: Helge Deller <deller@gmx.de>
Date:   Wed Feb 27 00:06:48 2013 +0100

parisc: avoid unitialized variable warning in pa_memcpy()

Avoid this warning, while still prevent gcc from optimizing away the exception code:
arch/parisc/lib/memcpy.c: In function ‘pa_memcpy’:
arch/parisc/lib/memcpy.c:256:2: warning: ‘dummy’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Helge Deller <deller@gmx.de>

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c
index 1dbca5c..a49cc81 100644
--- a/arch/parisc/lib/memcpy.c
+++ b/arch/parisc/lib/memcpy.c
@@ -68,7 +68,7 @@ 
 DECLARE_PER_CPU(struct exception_data, exception_data);
 
 #define preserve_branch(label)	do {					\
-	volatile int dummy;						\
+	volatile int dummy = 0;						\
 	/* The following branch is never taken, it's just here to  */	\
 	/* prevent gcc from optimizing away our exception code. */ 	\
 	if (unlikely(dummy != dummy))					\