瀏覽代碼

sh: unwinder: Fix up uninitialized variable warnings on sh2a build.

A couple of these popped up on the sh2a build, causing build failures.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt 15 年之前
父節點
當前提交
2f6dafc5fc
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      arch/sh/include/asm/dwarf.h
  2. 1 1
      arch/sh/kernel/dwarf.c

+ 1 - 1
arch/sh/include/asm/dwarf.h

@@ -200,7 +200,7 @@
  */
 static __always_inline unsigned long dwarf_read_arch_reg(unsigned int reg)
 {
-	unsigned long value;
+	unsigned long value = 0;
 
 	switch (reg) {
 	case 14:

+ 1 - 1
arch/sh/kernel/dwarf.c

@@ -887,7 +887,7 @@ static int __init dwarf_unwinder_init(void)
 {
 	u32 entry_type;
 	void *p, *entry;
-	int count, err;
+	int count, err = 0;
 	unsigned long len;
 	unsigned int c_entries, f_entries;
 	unsigned char *end;