parisc: avoid unitialized variable warning in pa_memcpy()
authorHelge Deller <deller@gmx.de>
Tue, 26 Feb 2013 23:06:48 +0000 (00:06 +0100)
committerHelge Deller <deller@gmx.de>
Sat, 2 Mar 2013 18:56:27 +0000 (19:56 +0100)
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>
arch/parisc/lib/memcpy.c

index 1dbca5c31b3c44ee0eff1d35ef0b2c7e6336fc4f..a49cc812df8a10c0c079a83d85c29e526626b73c 100644 (file)
@@ -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))                                   \