@@ -112,7 +112,7 @@ Regex::~Regex() {
112
112
113
113
std::list<SMatch> Regex::searchAll (const std::string& s) const {
114
114
std::list<SMatch> retList;
115
- int rc;
115
+ int rc = 0 ;
116
116
#ifdef WITH_PCRE2
117
117
PCRE2_SPTR pcre2_s = reinterpret_cast <PCRE2_SPTR>(s.c_str ());
118
118
PCRE2_SIZE offset = 0 ;
@@ -167,7 +167,7 @@ bool Regex::searchOneMatch(const std::string& s, std::vector<SMatchCapture>& cap
167
167
#ifdef WITH_PCRE2
168
168
PCRE2_SPTR pcre2_s = reinterpret_cast <PCRE2_SPTR>(s.c_str ());
169
169
pcre2_match_data *match_data = pcre2_match_data_create_from_pattern (m_pc, NULL );
170
- int rc;
170
+ int rc = 0 ;
171
171
if (m_pcje == 0 ) {
172
172
rc = pcre2_jit_match (m_pc, pcre2_s, s.length (), 0 , 0 , match_data, NULL );
173
173
}
@@ -285,7 +285,7 @@ int Regex::search(const std::string& s, SMatch *match) const {
285
285
#ifdef WITH_PCRE2
286
286
PCRE2_SPTR pcre2_s = reinterpret_cast <PCRE2_SPTR>(s.c_str ());
287
287
pcre2_match_data *match_data = pcre2_match_data_create_from_pattern (m_pc, NULL );
288
- int ret;
288
+ int ret = 0 ;
289
289
if (m_pcje == 0 ) {
290
290
ret = pcre2_match (m_pc, pcre2_s, s.length (),
291
291
0 , 0 , match_data, NULL ) > 0 ;
@@ -319,7 +319,7 @@ int Regex::search(const std::string& s) const {
319
319
#ifdef WITH_PCRE2
320
320
PCRE2_SPTR pcre2_s = reinterpret_cast <PCRE2_SPTR>(s.c_str ());
321
321
pcre2_match_data *match_data = pcre2_match_data_create_from_pattern (m_pc, NULL );
322
- int rc;
322
+ int rc = 0 ;
323
323
if (m_pcje == 0 ) {
324
324
rc = pcre2_jit_match (m_pc, pcre2_s, s.length (), 0 , 0 , match_data, NULL );
325
325
}
0 commit comments