From: Stephan Diestelhorst Date: Fri, 7 Mar 2014 20:56:23 +0000 (-0500) Subject: arm: Fix uninitialised warning with gcc 4.8 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bef2086f5bb1ef350181791c6dff14d0964a5680;p=gem5.git arm: Fix uninitialised warning with gcc 4.8 Small fix for a warning that prevents compilation with gcc 4.8.1 due to detecting that a variable might be uninitialised. The fix is to assign a safe default. --- diff --git a/src/arch/arm/utility.cc b/src/arch/arm/utility.cc index 3d7d9c4fc..d5b062621 100644 --- a/src/arch/arm/utility.cc +++ b/src/arch/arm/utility.cc @@ -704,7 +704,7 @@ bool decodeMrsMsrBankedReg(uint8_t sysM, bool r, bool &isIntReg, int ®Idx, CPSR cpsr, SCR scr, NSACR nsacr, bool checkSecurity) { - OperatingMode mode; + OperatingMode mode = MODE_UNDEFINED; bool ok = true; // R mostly indicates if its a int register or a misc reg, we override