瀏覽代碼

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>
Helge Deller 12 年之前
父節點
當前提交
d8d0524a39
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/parisc/lib/memcpy.c

+ 1 - 1
arch/parisc/lib/memcpy.c

@@ -68,7 +68,7 @@
 DECLARE_PER_CPU(struct exception_data, exception_data);
 DECLARE_PER_CPU(struct exception_data, exception_data);
 
 
 #define preserve_branch(label)	do {					\
 #define preserve_branch(label)	do {					\
-	volatile int dummy;						\
+	volatile int dummy = 0;						\
 	/* The following branch is never taken, it's just here to  */	\
 	/* The following branch is never taken, it's just here to  */	\
 	/* prevent gcc from optimizing away our exception code. */ 	\
 	/* prevent gcc from optimizing away our exception code. */ 	\
 	if (unlikely(dummy != dummy))					\
 	if (unlikely(dummy != dummy))					\