misc: Remove assertions ensuring unsigned values >= 0
This commit is contained in:
parent
377f081251
commit
f615c4aeb0
4 changed files with 3 additions and 4 deletions
|
@ -83,7 +83,6 @@ class ChunkGenerator
|
|||
{
|
||||
// chunkSize must be a power of two
|
||||
assert(chunkSize == 0 || isPowerOf2(chunkSize));
|
||||
assert(totalSize >= 0);
|
||||
|
||||
// set up initial chunk.
|
||||
curAddr = startAddr;
|
||||
|
|
|
@ -1567,7 +1567,7 @@ class HistStor
|
|||
size_type index =
|
||||
(int64_t)std::floor((val - min_bucket) / bucket_size);
|
||||
|
||||
assert(index >= 0 && index < size());
|
||||
assert(index < size());
|
||||
cvec[index] += number;
|
||||
|
||||
sum += val * number;
|
||||
|
|
|
@ -593,8 +593,8 @@ VncServer::recvCutText()
|
|||
size_t bytes_to_read = data_len > 1024 ? 1024 : data_len;
|
||||
len = read((uint8_t*)&str, bytes_to_read);
|
||||
str[bytes_to_read] = 0;
|
||||
assert(len >= data_len);
|
||||
data_len -= len;
|
||||
assert(data_len >= 0);
|
||||
DPRINTF(VNC, "Buffer: %s\n", str);
|
||||
}
|
||||
|
||||
|
|
2
src/mem/cache/tags/base_set_assoc.cc
vendored
2
src/mem/cache/tags/base_set_assoc.cc
vendored
|
@ -181,8 +181,8 @@ BaseSetAssoc::computeStats()
|
|||
if (blks[i].isValid()) {
|
||||
assert(blks[i].task_id < ContextSwitchTaskId::NumTaskId);
|
||||
occupanciesTaskId[blks[i].task_id]++;
|
||||
assert(blks[i].tickInserted <= curTick());
|
||||
Tick age = curTick() - blks[i].tickInserted;
|
||||
assert(age >= 0);
|
||||
|
||||
int age_index;
|
||||
if (age / SimClock::Int::us < 10) { // <10us
|
||||
|
|
Loading…
Reference in a new issue