mirror of
https://github.com/verilator/verilator.git
synced 2025-01-05 22:27:35 +00:00
Internals: Fix some cast and fallthrough warnings. No functional change
This commit is contained in:
parent
960b2ed023
commit
cf6a69da27
@ -409,8 +409,8 @@ public:
|
||||
void rangep(AstRange* nodep) { setNOp1p(nodep); }
|
||||
void setSignedState(VSignedState signst) {
|
||||
// Note NOSIGN does NOT change the state; this is required by the parser
|
||||
if (signst==signedst_UNSIGNED) numeric(VSignedState(signst));
|
||||
else if (signst==signedst_SIGNED) numeric(VSignedState(signst));
|
||||
if (signst==signedst_UNSIGNED) numeric(signst);
|
||||
else if (signst==signedst_SIGNED) numeric(signst);
|
||||
}
|
||||
// METHODS
|
||||
virtual AstBasicDType* basicp() const { return (AstBasicDType*)this; } // (Slow) recurse down to find basic data type
|
||||
@ -1797,7 +1797,7 @@ public:
|
||||
}}
|
||||
virtual bool same(AstNode* samep) const {
|
||||
return (m_packagep==samep->castPackageRef()->m_packagep); }
|
||||
virtual V3Hash sameHash() const { return V3Hash(V3Hash(m_packagep)); }
|
||||
virtual V3Hash sameHash() const { return V3Hash(m_packagep); }
|
||||
virtual void dump(ostream& str=cout);
|
||||
AstPackage* packagep() const { return m_packagep; }
|
||||
void packagep(AstPackage* nodep) { m_packagep=nodep; }
|
||||
@ -1919,7 +1919,7 @@ public:
|
||||
}
|
||||
ASTNODE_NODE_FUNCS(SenItem)
|
||||
virtual void dump(ostream& str);
|
||||
virtual V3Hash sameHash() const { return V3Hash(V3Hash(edgeType())); }
|
||||
virtual V3Hash sameHash() const { return V3Hash(edgeType()); }
|
||||
virtual bool same(AstNode* samep) const {
|
||||
return edgeType()==samep->castSenItem()->edgeType(); }
|
||||
AstEdgeType edgeType() const { return m_edgeType; } // * = Posedge/negedge
|
||||
|
@ -453,7 +453,7 @@ private:
|
||||
DfaVertex* fromvertexp = static_cast<DfaVertex*>(edgep->fromp());
|
||||
if (fromvertexp != vertexp
|
||||
&& !fromvertexp->user()) {
|
||||
workps.push(static_cast<DfaVertex*>(fromvertexp));
|
||||
workps.push(fromvertexp);
|
||||
fromvertexp->user(1);
|
||||
}
|
||||
}
|
||||
|
@ -799,7 +799,7 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char
|
||||
}
|
||||
else if ( !strcmp (sw, "-Mdir") && (i+1)<argc ) {
|
||||
shift; m_makeDir = argv[i];
|
||||
addIncDirFallback (string (m_makeDir)); // Need to find generated files there too
|
||||
addIncDirFallback (m_makeDir); // Need to find generated files there too
|
||||
}
|
||||
else if ( !strcmp (sw, "-o") && (i+1)<argc ) {
|
||||
shift; m_exeName = argv[i];
|
||||
|
@ -1310,7 +1310,8 @@ int V3PreProcImp::getStateToken() {
|
||||
goto next_tok;
|
||||
}
|
||||
}
|
||||
fatalSrc("Bad case\n");
|
||||
fatalSrc("Bad case\n"); // FALLTHRU
|
||||
goto next_tok; // but not really, above fatal catches it, but if add goto, static analysis complains
|
||||
}
|
||||
case VP_ERROR: {
|
||||
statePush(ps_ERRORNAME);
|
||||
|
Loading…
Reference in New Issue
Block a user