From: Konstantinos Margaritis Date: Sat, 11 May 2024 20:45:01 +0000 (+0300) Subject: Fix false positive redundantAssignment warnings X-Git-Tag: vectorscan/5.4.12^2~48^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F270%2Fhead;p=thirdparty%2Fvectorscan.git Fix false positive redundantAssignment warnings --- diff --git a/src/parser/ComponentRepeat.cpp b/src/parser/ComponentRepeat.cpp index 78277108..a6c55dbd 100644 --- a/src/parser/ComponentRepeat.cpp +++ b/src/parser/ComponentRepeat.cpp @@ -132,7 +132,7 @@ void ComponentRepeat::notePositions(GlushkovBuildState &bs) { posFirst = bs.getBuilder().numVertices(); sub_comp->notePositions(bs); - u32 copies = m_max < NoLimit ? m_max : MAX(m_min, 1); + u32 copies = (m_max < NoLimit) ? m_max : std::max(m_min, 1U); DEBUG_PRINTF("building %u copies of repeated region\n", copies); m_firsts.clear(); m_lasts.clear();