mirror of
https://github.com/verilator/verilator.git
synced 2025-01-05 22:27:35 +00:00
Fix MSVC warnings. No functional change intended.
This commit is contained in:
parent
0d3cb86a44
commit
708f875b31
@ -820,9 +820,9 @@ public:
|
|||||||
AstNodeDType* skipRefToEnump() const override { return (AstNodeDType*)this; }
|
AstNodeDType* skipRefToEnump() const override { return (AstNodeDType*)this; }
|
||||||
int widthAlignBytes() const override { return subDTypep()->widthAlignBytes(); }
|
int widthAlignBytes() const override { return subDTypep()->widthAlignBytes(); }
|
||||||
int widthTotalBytes() const override { return subDTypep()->widthTotalBytes(); }
|
int widthTotalBytes() const override { return subDTypep()->widthTotalBytes(); }
|
||||||
int itemCount() const {
|
size_t itemCount() const {
|
||||||
size_t count = 0;
|
size_t count = 0;
|
||||||
for (AstNode* itemp = itemsp(); itemp; itemp = itemp->nextp()) count++;
|
for (AstNode* itemp = itemsp(); itemp; itemp = itemp->nextp()) ++count;
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
bool isCompound() const override { return false; }
|
bool isCompound() const override { return false; }
|
||||||
|
@ -493,7 +493,7 @@ string V3Options::fileExists(const string& filename) {
|
|||||||
try {
|
try {
|
||||||
for (const auto& dirEntry : std::filesystem::directory_iterator(dir.c_str()))
|
for (const auto& dirEntry : std::filesystem::directory_iterator(dir.c_str()))
|
||||||
setp->insert(dirEntry.path().filename().string());
|
setp->insert(dirEntry.path().filename().string());
|
||||||
} catch (std::filesystem::filesystem_error const& ex) { return ""; }
|
} catch (std::filesystem::filesystem_error const& ex) { (void)ex; return ""; }
|
||||||
#else
|
#else
|
||||||
if (DIR* const dirp = opendir(dir.c_str())) {
|
if (DIR* const dirp = opendir(dir.c_str())) {
|
||||||
while (struct dirent* direntp = readdir(dirp)) setp->insert(direntp->d_name);
|
while (struct dirent* direntp = readdir(dirp)) setp->insert(direntp->d_name);
|
||||||
|
@ -309,9 +309,9 @@ class RandomizeVisitor final : public VNVisitor {
|
|||||||
AstVar* enumValueTabp(AstEnumDType* nodep) {
|
AstVar* enumValueTabp(AstEnumDType* nodep) {
|
||||||
if (nodep->user2p()) return VN_AS(nodep->user2p(), Var);
|
if (nodep->user2p()) return VN_AS(nodep->user2p(), Var);
|
||||||
UINFO(9, "Construct Venumvaltab " << nodep << endl);
|
UINFO(9, "Construct Venumvaltab " << nodep << endl);
|
||||||
AstNodeArrayDType* const vardtypep
|
AstNodeArrayDType* const vardtypep = new AstUnpackArrayDType{
|
||||||
= new AstUnpackArrayDType{nodep->fileline(), nodep->dtypep(),
|
nodep->fileline(), nodep->dtypep(),
|
||||||
new AstRange{nodep->fileline(), nodep->itemCount(), 0}};
|
new AstRange{nodep->fileline(), static_cast<int>(nodep->itemCount()), 0}};
|
||||||
AstInitArray* const initp = new AstInitArray{nodep->fileline(), vardtypep, nullptr};
|
AstInitArray* const initp = new AstInitArray{nodep->fileline(), vardtypep, nullptr};
|
||||||
v3Global.rootp()->typeTablep()->addTypesp(vardtypep);
|
v3Global.rootp()->typeTablep()->addTypesp(vardtypep);
|
||||||
AstVar* const varp
|
AstVar* const varp
|
||||||
|
Loading…
Reference in New Issue
Block a user