scons: Fixes uninitialized warnings issued by clang

Small fixes to appease recent clang versions.
This commit is contained in:
Mitch Hayenga
2014-03-07 15:56:23 -05:00
parent bef2086f5b
commit b9a9d99b22
4 changed files with 11 additions and 4 deletions

View File

@@ -2509,7 +2509,7 @@ fplibRecipEstimate(uint32_t op, FPSCR &fpscr)
result = fp32_infinity(sgn);
flags |= FPLIB_DZC;
} else if (!((uint32_t)(op << 1) >> 22)) {
bool overflow_to_inf;
bool overflow_to_inf = false;
switch (FPCRRounding(fpscr)) {
case FPRounding_TIEEVEN:
overflow_to_inf = true;
@@ -2570,7 +2570,7 @@ fplibRecipEstimate(uint64_t op, FPSCR &fpscr)
result = fp64_infinity(sgn);
flags |= FPLIB_DZC;
} else if (!((uint64_t)(op << 1) >> 51)) {
bool overflow_to_inf;
bool overflow_to_inf = false;
switch (FPCRRounding(fpscr)) {
case FPRounding_TIEEVEN:
overflow_to_inf = true;

View File

@@ -50,6 +50,13 @@
#define M5_PRAGMA_NORETURN(x)
#define M5_DUMMY_RETURN
#define M5_VAR_USED __attribute__((unused))
#if defined(__clang__)
#define M5_CLASS_VAR_USED M5_VAR_USED
#else
#define M5_CLASS_VAR_USED
#endif
#define M5_ATTR_PACKED __attribute__ ((__packed__))
#define M5_NO_INLINE __attribute__ ((__noinline__))
#else

View File

@@ -72,7 +72,7 @@ class Scoreboard
* the misc registers that come after the physical registers and
* which are hardwired to be always considered ready.
*/
unsigned numTotalRegs;
unsigned M5_CLASS_VAR_USED numTotalRegs;
/** The index of the zero register. */
PhysRegIndex zeroRegIdx;

View File

@@ -133,7 +133,7 @@ class ProbeManager
{
private:
/** Required for sensible debug messages.*/
const SimObject *object;
const M5_CLASS_VAR_USED SimObject *object;
/** Vector for name look-up. */
std::vector<ProbePoint *> points;