From: Helge Deller Date: Tue, 26 Feb 2013 23:06:48 +0000 (+0100) Subject: parisc: avoid unitialized variable warning in pa_memcpy() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d8d0524a39056dbdafece1ed65ae51afc711c8b5;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 --- diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c index 1dbca5c31b3c..a49cc812df8a 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)) \