From 768c4b4526b1e6340587d72b985005da786a8494 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 23 Jun 2017 14:20:50 +0200 Subject: YarrOp: Initialize members Fix GCC 7 warnings: 3rdparty\masm\yarr\YarrJIT.cpp:455:12: error: '.JSC::Yarr::YarrGenerator<(JSC::Yarr::YarrJITCompileMode)1>::YarrOp::m_alternative' may be used uninitialized in this function [-Werror=maybe-uninitialized] 3rdparty\masm\yarr\YarrJIT.cpp:455:12: error: '.JSC::Yarr::YarrGenerator<(JSC::Yarr::YarrJITCompileMode)1>::YarrOp::m_previousOp' may be used uninitialized in this function [-Werror=maybe-uninitialized] 3rdparty\masm\yarr\YarrJIT.cpp:455:12: error: '.JSC::Yarr::YarrGenerator<(JSC::Yarr::YarrJITCompileMode)1>::YarrOp::m_nextOp' may be used uninitialized in this function [-Werror=maybe-uninitialized] 3rdparty\masm\yarr\YarrJIT.cpp:455:12: error: '.JSC::Yarr::YarrGenerator<(JSC::Yarr::YarrJITCompileMode)1>::YarrOp::m_term' may be used uninitialized in this function [-Werror=maybe-uninitialized] Task-number: QTBUG-61558 Change-Id: I661f5455dd4cd57797d09edde9e097e17fb98dae Reviewed-by: Simon Hausmann --- src/3rdparty/masm/yarr/YarrJIT.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/3rdparty/masm/yarr/YarrJIT.cpp b/src/3rdparty/masm/yarr/YarrJIT.cpp index e4f2d97759..71123b7be7 100644 --- a/src/3rdparty/masm/yarr/YarrJIT.cpp +++ b/src/3rdparty/masm/yarr/YarrJIT.cpp @@ -468,16 +468,16 @@ class YarrGenerator : private DefaultMacroAssembler { // The operation, as a YarrOpCode, and also a reference to the PatternTerm. YarrOpCode m_op; - PatternTerm* m_term; + PatternTerm* m_term = nullptr; // For alternatives, this holds the PatternAlternative and doubly linked // references to this alternative's siblings. In the case of the // OpBodyAlternativeEnd node at the end of a section of repeating nodes, // m_nextOp will reference the OpBodyAlternativeBegin node of the first // repeating alternative. - PatternAlternative* m_alternative; - size_t m_previousOp; - size_t m_nextOp; + PatternAlternative* m_alternative = nullptr; + size_t m_previousOp = 0; + size_t m_nextOp = 0; // Used to record a set of Jumps out of the generated code, typically // used for jumps out to backtracking code, and a single reentry back -- cgit v1.2.3