Codacy/Cppcheck cleanups.

This commit is contained in:
Wilson Snyder
2019-10-24 22:40:15 -04:00
parent 0cbfd29ac5
commit 352adbed74
6 changed files with 9 additions and 7 deletions
+1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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.
//