Skip to content

Commit

Permalink
MIPS: IP32: Fix build error due to uninitialized variable.
Browse files Browse the repository at this point in the history
  CC      arch/mips/sgi-ip32/ip32-reset.o
cc1: warnings being treated as errors
arch/mips/sgi-ip32/ip32-reset.c: In function 'debounce':
arch/mips/sgi-ip32/ip32-reset.c:97: error: 'reg_a' is used uninitialized in this function

The issues is old but due to the volatile keyword gcc older than 4.4 did
not warn about this obvious bug.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed May 22, 2009
1 parent 63d3892 commit 63c901c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/mips/sgi-ip32/ip32-reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ static void debounce(unsigned long data)
volatile unsigned char reg_a, reg_c, xctrl_a;

reg_c = CMOS_READ(RTC_INTR_FLAGS);
reg_a = CMOS_READ(RTC_REG_A);
CMOS_WRITE(reg_a | DS_REGA_DV0, RTC_REG_A);
wbflush();
xctrl_a = CMOS_READ(DS_B1_XCTRL4A);
Expand Down

0 comments on commit 63c901c

Please sign in to comment.