Fix integer compare warning (#4887). No functional change.

This commit is contained in:
Wilson Snyder 2024-02-13 18:37:41 -05:00
parent 65b632a7dd
commit d1dec38f38
2 changed files with 4 additions and 4 deletions

View File

@ -118,11 +118,11 @@ void VerilatedVcd::open(const char* filename) VL_MT_SAFE_EXCLUDES(m_mutex) {
printStr(" $end\n");
// Scope and signal definitions
assert(m_indent == 0);
assert(m_indent >= 0);
++m_indent;
Super::traceInit();
--m_indent;
assert(m_indent == 0);
assert(m_indent >= 0);
printStr("$enddefinitions $end\n\n\n");
@ -300,7 +300,7 @@ void VerilatedVcd::bufferFlush() VL_MT_UNSAFE_ONE {
void VerilatedVcd::printIndent(int level_change) {
if (level_change < 0) m_indent += level_change;
for (int i = 0; i < m_indent; i++) printStr(" ");
for (int i = 0; i < m_indent; ++i) printStr(" ");
if (level_change > 0) m_indent += level_change;
}

View File

@ -50,7 +50,7 @@ private:
bool m_isOpen = false; // True indicates open file
std::string m_filename; // Filename we're writing to (if open)
uint64_t m_rolloverSize = 0; // File size to rollover at
unsigned m_indent = 0; // Indentation depth
int m_indent = 0; // Indentation depth
char* m_wrBufp; // Output buffer
char* m_wrFlushp; // Output buffer flush trigger location