mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Fix cppcheck warnings. No functional change intended.
This commit is contained in:
@@ -120,6 +120,7 @@ void VFileContent::pushText(const string& text) {
|
||||
|
||||
string VFileContent::getLine(int lineno) const {
|
||||
// Return error text rather than asserting so the user isn't left without a message
|
||||
// cppcheck-suppress negativeContainerIndex
|
||||
if (VL_UNCOVERABLE(lineno < 0 || lineno >= (int)m_lines.size())) {
|
||||
if (debug() || v3Global.opt.debugCheck()) {
|
||||
return ("%Error-internal-contents-bad-ct"+cvtToStr(m_id)
|
||||
|
||||
Reference in New Issue
Block a user