mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +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; }
|
||||
int widthAlignBytes() const override { return subDTypep()->widthAlignBytes(); }
|
||||
int widthTotalBytes() const override { return subDTypep()->widthTotalBytes(); }
|
||||
int itemCount() const {
|
||||
size_t itemCount() const {
|
||||
size_t count = 0;
|
||||
for (AstNode* itemp = itemsp(); itemp; itemp = itemp->nextp()) count++;
|
||||
for (AstNode* itemp = itemsp(); itemp; itemp = itemp->nextp()) ++count;
|
||||
return count;
|
||||
}
|
||||
bool isCompound() const override { return false; }
|
||||
|
@ -493,7 +493,7 @@ string V3Options::fileExists(const string& filename) {
|
||||
try {
|
||||
for (const auto& dirEntry : std::filesystem::directory_iterator(dir.c_str()))
|
||||
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
|
||||
if (DIR* const dirp = opendir(dir.c_str())) {
|
||||
while (struct dirent* direntp = readdir(dirp)) setp->insert(direntp->d_name);
|
||||
|
@ -309,9 +309,9 @@ class RandomizeVisitor final : public VNVisitor {
|
||||
AstVar* enumValueTabp(AstEnumDType* nodep) {
|
||||
if (nodep->user2p()) return VN_AS(nodep->user2p(), Var);
|
||||
UINFO(9, "Construct Venumvaltab " << nodep << endl);
|
||||
AstNodeArrayDType* const vardtypep
|
||||
= new AstUnpackArrayDType{nodep->fileline(), nodep->dtypep(),
|
||||
new AstRange{nodep->fileline(), nodep->itemCount(), 0}};
|
||||
AstNodeArrayDType* const vardtypep = new AstUnpackArrayDType{
|
||||
nodep->fileline(), nodep->dtypep(),
|
||||
new AstRange{nodep->fileline(), static_cast<int>(nodep->itemCount()), 0}};
|
||||
AstInitArray* const initp = new AstInitArray{nodep->fileline(), vardtypep, nullptr};
|
||||
v3Global.rootp()->typeTablep()->addTypesp(vardtypep);
|
||||
AstVar* const varp
|
||||
|
Loading…
Reference in New Issue
Block a user