mirror of
https://github.com/verilator/verilator.git
synced 2026-09-08 10:33:20 +02:00
Codacy/Cppcheck cleanups.
This commit is contained in:
@@ -290,6 +290,7 @@ string AstVar::vlArgType(bool named, bool forReturn, bool forFunc) const {
|
||||
if (mayparen) { oname = " ("+oname+")"; mayparen = false; }
|
||||
oarray += "["+cvtToStr(widthWords())+"]";
|
||||
}
|
||||
if (mayparen) { }
|
||||
return otype+oname+oarray;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -223,7 +223,7 @@ inline bool V3FileDependImp::checkTimes(const string& filename, const string& cm
|
||||
return false;
|
||||
}
|
||||
{
|
||||
string ignore = V3Os::getline(*ifp);
|
||||
string ignore = V3Os::getline(*ifp); if (ignore.empty()) { /*used*/ }
|
||||
}
|
||||
{
|
||||
char chkDir; *ifp>>chkDir;
|
||||
|
||||
+2
-2
@@ -355,7 +355,7 @@ V3Number& V3Number::setLong(uint32_t value) {
|
||||
V3Number& V3Number::setLongS(vlsint32_t value) {
|
||||
for (int i=0; i<words(); i++) m_value[i]=m_valueX[i] = 0;
|
||||
union { uint32_t u; vlsint32_t s; } u;
|
||||
u.s = value;
|
||||
u.s = value; if (u.s) { }
|
||||
m_value[0] = u.u;
|
||||
opCleanThis();
|
||||
return *this;
|
||||
@@ -366,7 +366,7 @@ V3Number& V3Number::setDouble(double value) {
|
||||
}
|
||||
m_double = true;
|
||||
union { double d; uint32_t u[2]; } u;
|
||||
u.d = value;
|
||||
u.d = value; if (u.d) { }
|
||||
for (int i=2; i<words(); i++) m_value[i]=m_valueX[i] = 0;
|
||||
m_value[0] = u.u[0]; m_value[1] = u.u[1];
|
||||
return *this;
|
||||
|
||||
+1
-1
@@ -1388,7 +1388,7 @@ private:
|
||||
donorp = fromp;
|
||||
recipientp = top;
|
||||
}
|
||||
fromp = top = NULL; // Use donorp and recipientp now instead
|
||||
VL_DANGLING(fromp); VL_DANGLING(top); // Use donorp and recipientp now instead
|
||||
|
||||
// Recursively update forward and reverse CP numbers.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user