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:
@@ -727,11 +727,13 @@ AstNodeDType* AstNodeDType::dtypeDimensionp(int dimension) {
|
||||
} else if (AstBasicDType* adtypep = VN_CAST(dtypep, BasicDType)) {
|
||||
// AstBasicDType - nothing below, return null
|
||||
if (adtypep->isRanged()) {
|
||||
// cppcheck-suppress unreadVariable // Cppcheck bug - thinks dim isn't used
|
||||
if ((dim++) == dimension) return adtypep;
|
||||
}
|
||||
return nullptr;
|
||||
} else if (AstNodeUOrStructDType* adtypep = VN_CAST(dtypep, NodeUOrStructDType)) {
|
||||
if (adtypep->packed()) {
|
||||
// cppcheck-suppress unreadVariable // Cppcheck bug - thinks dim isn't used
|
||||
if ((dim++) == dimension) return adtypep;
|
||||
}
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user