mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Fix C++11 warnings
This commit is contained in:
parent
eaf09ba0e7
commit
218dd4322b
@ -2398,7 +2398,9 @@ void VerilatedContext::timeunit(int value) VL_MT_SAFE {
|
||||
}
|
||||
void VerilatedContext::timeprecision(int value) VL_MT_SAFE {
|
||||
if (value < 0) value = -value; // Stored as 0..15
|
||||
#ifdef SYSTEMC_VERSION
|
||||
int sc_prec = 99;
|
||||
#endif
|
||||
{
|
||||
const VerilatedLockGuard lock{m_mutex};
|
||||
m_s.m_timeprecision = value;
|
||||
|
@ -217,7 +217,7 @@ public:
|
||||
int numThreads() const { return m_workers.size(); }
|
||||
VlWorkerThread* workerp(int index) {
|
||||
assert(index >= 0);
|
||||
assert(index < m_workers.size());
|
||||
assert(static_cast<size_t>(index) < m_workers.size());
|
||||
return m_workers[index];
|
||||
}
|
||||
|
||||
|
@ -616,7 +616,7 @@ void VerilatedTrace<VL_SUB_T, VL_BUF_T>::dump(uint64_t timeui) VL_MT_SAFE_EXCLUD
|
||||
*m_offloadBufferWritep++ = VerilatedTraceOffloadCommand::END;
|
||||
|
||||
// Assert no buffer overflow
|
||||
assert(m_offloadBufferWritep - bufferp <= m_offloadBufferSize);
|
||||
assert(static_cast<size_t>(m_offloadBufferWritep - bufferp) <= m_offloadBufferSize);
|
||||
|
||||
// Reset our pointers as we are giving up the buffer
|
||||
m_offloadBufferWritep = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user