Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove noisy static_cast<int>(0). #1434

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/codegen/codegen_cpp_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -855,9 +855,7 @@
}
if (index) {
printer->add_text("[");
printer->add_text("static_cast<int>(");
index->accept(*this);
printer->add_text(")");
printer->add_text("]");
}
}
Expand All @@ -866,9 +864,7 @@
void CodegenCppVisitor::visit_indexed_name(const IndexedName& node) {
node.get_name()->accept(*this);
printer->add_text("[");
printer->add_text("static_cast<int>(");
node.get_length()->accept(*this);
printer->add_text(")");
printer->add_text("]");
}

Expand Down Expand Up @@ -1661,5 +1657,5 @@
}
}
}
} // namespace codegen

Check warning on line 1660 in src/codegen/codegen_cpp_visitor.cpp

View workflow job for this annotation

GitHub Actions / { "flag_warnings": "ON", "glibc_asserts": "ON", "os": "ubuntu-22.04" }

unused variable ‘size’ [-Wunused-variable]

Check warning on line 1660 in src/codegen/codegen_cpp_visitor.cpp

View workflow job for this annotation

GitHub Actions / { "flag_warnings": "ON", "os": "ubuntu-22.04", "sanitizer": "undefined" }

unused variable 'size' [-Wunused-variable]
} // namespace nmodl
Loading