diff --git a/undef-op.patch b/undef-op.patch index d927cdf..a1d259d 100644 --- a/undef-op.patch +++ b/undef-op.patch @@ -1,3 +1,4 @@ +Fixes undefined behavior | strutils.cxx:31:45: warning: operation on 'idx' may be undefined [-Wsequence-point] @@ -21,7 +22,7 @@ Index: mimetic-0.9.7/mimetic/circular_buffer.h @@ -52,7 +52,7 @@ struct circular_buffer inline void push_back(const value_type& c) { - m_pItem[m_last] = c; + m_pItem[m_last] = c; - m_last = ++m_last % m_sz; + m_last = (m_last+1) % m_sz; m_count += (m_count == m_sz ? 0 : 1); @@ -31,7 +32,7 @@ Index: mimetic-0.9.7/mimetic/circular_buffer.h } inline void pop_front() { -- m_first = ++m_first % m_sz; +- m_first = ++m_first % m_sz; + m_first = (m_first+1) % m_sz; m_count--; }