From 9c5dd8d767ab70cc0681166c65bca033da7c4183 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 15 Apr 2014 18:18:36 -0400 Subject: [PATCH] Fix RHEL5.6 compile warnings. --- include/verilated.h | 2 -- src/V3Broken.cpp | 3 ++- src/V3Width.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/verilated.h b/include/verilated.h index 861cbc993..15411078d 100644 --- a/include/verilated.h +++ b/include/verilated.h @@ -1434,7 +1434,6 @@ static inline QData VL_STREAML_FAST_QQI(int, int lbits, int, QData ld, IData rd_ static inline IData VL_STREAML_III(int, int lbits, int, IData ld, IData rd) { IData ret = 0; // Slice size should never exceed the lhs width - int ssize = ((int)rd < lbits) ? ((int)rd) : lbits; IData mask = VL_MASK_I(rd); for (int istart=0; istartv3fatalSrc("Newing AstNode object that is already allocated\n"); } if (iter == s_nodes.end()) { - s_nodes.insert(make_pair(nodep,FLAG_ALLOCATED)); + int flags = FLAG_ALLOCATED; // This int needed to appease GCC 4.1.2 + s_nodes.insert(make_pair(nodep,flags)); } } static void setUnder(const AstNode* nodep, bool flag) { diff --git a/src/V3Width.cpp b/src/V3Width.cpp index 8bd6e4d9b..530d367ee 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -2383,7 +2383,7 @@ private: // Extend AstNRelinker linker; nodep->unlinkFrBack(&linker); - bool doSigned; + bool doSigned = false; switch (extendRule) { case EXTEND_ZERO: doSigned = false; break; case EXTEND_EXP: doSigned = nodep->isSigned() && expDTypep->isSigned(); break;