silence some warnings

This commit is contained in:
Emily Schmidt 2024-07-25 12:54:58 +01:00
parent fbee31080e
commit 8f77494263
3 changed files with 8 additions and 5 deletions

View File

@ -388,6 +388,8 @@ public:
case DriveType::MULTIPLE:
inner = multiple_.hash();
break;
default:
log_abort();
}
return mkhash((unsigned int)type_, inner);
}
@ -412,7 +414,7 @@ public:
case DriveType::MULTIPLE:
return multiple_ == other.multiple_;
}
log_assert(false);
log_abort();
}
bool operator!=(const DriveBit &other) const
@ -958,7 +960,7 @@ public:
case DriveType::MULTIPLE:
return multiple_ == other.multiple_;
}
log_assert(false);
log_abort();
}
bool operator!=(const DriveChunk &other) const
@ -985,7 +987,7 @@ public:
case DriveType::MULTIPLE:
return multiple_ < other.multiple_;
}
log_assert(false);
log_abort();
}
DriveType type() const { return type_; }

View File

@ -295,6 +295,7 @@ namespace Functional {
case Fn::memory_read: return v.memory_read(*this, arg(0), arg(1)); break;
case Fn::memory_write: return v.memory_write(*this, arg(0), arg(1), arg(2)); break;
}
log_abort();
}
std::string to_string();
std::string to_string(std::function<std::string(Node)>);
@ -384,7 +385,7 @@ namespace Functional {
explicit Factory(IR &ir) : _ir(ir) {}
Node add(IR::NodeData &&fn, Sort &&sort, std::initializer_list<Node> args) {
log_assert(!sort.is_signal() || sort.width() > 0);
log_assert(!sort.is_memory() || sort.addr_width() > 0 && sort.data_width() > 0);
log_assert(!sort.is_memory() || (sort.addr_width() > 0 && sort.data_width() > 0));
IR::Graph::Ref ref = _ir._graph.add(std::move(fn), {std::move(sort)});
for (auto arg : args)
ref.append_arg(IR::Graph::ConstRef(arg));

View File

@ -318,7 +318,7 @@ public:
// insert multiple words at the given address, overriding any previous assignment.
template<typename Iterator> void insert_range(addr_t addr, Iterator begin, Iterator end) {
auto words = end - begin;
log_assert(addr < 1<<_addr_width); log_assert(words <= (1<<_addr_width) - addr);
log_assert(addr < (addr_t)(1<<_addr_width)); log_assert(words <= (addr_t)(1<<_addr_width) - addr);
auto range = _reserve_range(addr, addr + words);
auto it = _range_data(range, addr);
for(; begin != end; ++begin)