Skip to content

Commit

Permalink
escape compile-time warnings (gcc 11.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkos committed Oct 10, 2023
1 parent c76be8b commit d886dd0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2005,8 +2005,9 @@ compile_anchor_look_behind_node(AnchorNode* node, regex_t* reg, ParseEnv* env)
COP(reg)->cut_to_mark.restore_pos = FALSE;
}
else {
MemNumType mid1, mid2, mid3;
OnigLen diff;
MemNumType mid1, mid2;
MemNumType mid3 = 0; /* ignore uninitialized warning */

if (IS_NOT_NULL(node->lead_node)) {
MinMaxCharLen ci;
Expand Down Expand Up @@ -2144,8 +2145,9 @@ compile_anchor_look_behind_not_node(AnchorNode* node, regex_t* reg,
r = add_op(reg, OP_POP);
}
else {
MemNumType mid1, mid2, mid3;
OnigLen diff;
MemNumType mid1, mid2;
MemNumType mid3 = 0; /* ignore uninitialized warning */

ID_ENTRY(env, mid1);
r = add_op(reg, OP_SAVE_VAL);
Expand Down Expand Up @@ -8043,9 +8045,9 @@ detect_can_be_slow(Node* node, SlowElementCount* ct, int ncall, int calls[])

case ND_QUANT:
{
int prev_heavy_element;
QuantNode* qn;
Node* body;
int prev_heavy_element = 0;

qn = QUANT_(node);
body = ND_BODY(node);
Expand Down

0 comments on commit d886dd0

Please sign in to comment.