Internals: Fix some -Wsuggest-attribute=const suggestions.

This commit is contained in:
Wilson Snyder 2019-05-14 21:46:19 -04:00
parent 8ad1a68420
commit 1fb0af7fba
5 changed files with 9 additions and 12 deletions

View File

@ -690,9 +690,6 @@ void AstNode::deleteNode() {
// and we can debug easier.
}
AstNode::~AstNode() {
}
void AstNode::deleteTreeIter() {
// private: Delete list of nodes. Publicly call deleteTree() instead.
// Audited to make sure this is never NULL

View File

@ -1229,7 +1229,7 @@ public:
bool brokeExistsAbove() const;
// CONSTRUCTORS
virtual ~AstNode();
virtual ~AstNode() {}
#ifdef VL_LEAK_CHECKS
static void* operator new(size_t size);
static void operator delete(void* obj, size_t size);

View File

@ -327,8 +327,11 @@ public:
class V3GraphTestImport : public V3GraphTest {
// cppcheck-suppress functionConst
#ifdef GRAPH_IMPORT
void dotImport();
#else
void dotImport() {}
#endif
public:
virtual string name() { return "import"; }
@ -344,11 +347,8 @@ public:
}
};
#if 0
#ifdef GRAPH_IMPORT
# include "graph_export.cpp"
#else
void V3GraphTestImport::dotImport() {
}
#endif
//======================================================================

View File

@ -287,8 +287,8 @@ void V3Number::setNames(AstNode* nodep) {
int V3Number::log2b(uint32_t num) {
// See also opCLog2
for (int bit=31; bit>0; bit--) if (num & (VL_ULL(1)<<bit)) return(bit);
return(0);
for (int bit=31; bit>0; bit--) if (num & (VL_ULL(1)<<bit)) return bit;
return 0;
}
//======================================================================

View File

@ -170,7 +170,7 @@ public:
fileline()->v3errorEnd(str);
}
const char* tokenName(int tok);
static const char* tokenName(int tok);
void debugToken(int tok, const char* cmtp);
void parseTop();
void parseUndef();