Fix GCC 4.7.0 compile warnings, bug530.

This commit is contained in:
Wilson Snyder 2012-07-15 12:27:36 -04:00
parent 3e5067feb1
commit 96155365b2
5 changed files with 11 additions and 9 deletions

View File

@ -41,6 +41,8 @@ indicates the contributor was also the author of the fix; Thanks!
**** Fix false UNUSED warning on file system calls. [Holger Waechtler]
**** Fix GCC 4.7.0 compile warnings, bug530. [Jeremy Bennett]
**** Fix svdpi.h compile error on Apple OS.

View File

@ -360,7 +360,7 @@ private:
CdcEitherVertex* traceAsyncRecurse(CdcEitherVertex* vertexp, bool mark) {
// First pass: Return vertex of any hazardous stuff attached, or NULL if OK
// If first pass returns true, second pass calls asyncPath() on appropriate nodes
if (vertexp->user()>=m_userGeneration) return false; // Processed - prevent loop
if (vertexp->user()>=m_userGeneration) return NULL; // Processed - prevent loop
vertexp->user(m_userGeneration);
CdcEitherVertex* mark_outp = NULL;
@ -383,7 +383,7 @@ private:
CdcEitherVertex* eFromVertexp = (CdcEitherVertex*)edgep->fromp();
eFromVertexp->asyncPath(true);
}
return false;
return NULL;
}
// Also ok if from flop, but partially trace the flop so more obvious to users
if (vvertexp->fromFlop()) {
@ -391,7 +391,7 @@ private:
CdcEitherVertex* eFromVertexp = (CdcEitherVertex*)edgep->fromp();
eFromVertexp->asyncPath(true);
}
return false;
return NULL;
}
}

View File

@ -82,9 +82,9 @@ private:
nodep->dtypep(new_dtypep);
} else {
nodep->dtypeChgWidth(width, nodep->widthMin());
AstNodeDType* new_dtypep = nodep->dtypep();
if (new_dtypep == old_dtypep) nodep->v3fatalSrc("Dtype didn't change when width changed");
old_dtypep->user3p(new_dtypep); // Remember for next time
AstNodeDType* new_dtypep2 = nodep->dtypep();
if (new_dtypep2 == old_dtypep) nodep->v3fatalSrc("Dtype didn't change when width changed");
old_dtypep->user3p(new_dtypep2); // Remember for next time
}
}
}

View File

@ -320,7 +320,7 @@ string V3PreProcImp::defParams(const string& name) {
}
FileLine* V3PreProcImp::defFileline(const string& name) {
DefinesMap::iterator iter = m_defines.find(name);
if (iter == m_defines.end()) return false;
if (iter == m_defines.end()) return NULL;
return iter->second.fileline();
}
void V3PreProcImp::define(FileLine* fl, const string& name, const string& value,

View File

@ -1239,7 +1239,7 @@ class TristateVisitor : public TristateBaseVisitor {
// Clear state
m_tgraph.clear();
m_unique = 0;
m_logicp = false;
m_logicp = NULL;
m_lhsmap.clear();
m_modp = nodep;
// Walk the graph, finding all variables and tristate constructs
@ -1291,7 +1291,7 @@ public:
m_cellp = NULL;
m_unique = 0;
m_alhs = false;
m_logicp = false;
m_logicp = NULL;
m_tgraph.clear();
nodep->accept(*this);
}