From 35c9969e6e0005027f32d516744606751dcaab67 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Fri, 14 Dec 2012 11:55:45 +0000 Subject: [PATCH] regcomp.c: silence some compiler warnings ReREFCNT_inc() returns a value, so cast it to void where not used. --- regcomp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/regcomp.c b/regcomp.c index 2080138..d7a289c 100644 --- a/regcomp.c +++ b/regcomp.c @@ -3871,7 +3871,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SAVEFREESV(RExC_rx_sv); ckWARNreg(RExC_parse, "Quantifier unexpected on zero-length expression"); - ReREFCNT_inc(RExC_rx_sv); + (void)ReREFCNT_inc(RExC_rx_sv); } min += minnext * mincount; @@ -9654,7 +9654,7 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) "%.*s matches null string many times", (int)(RExC_parse >= origparse ? RExC_parse - origparse : 0), origparse); - ReREFCNT_inc(RExC_rx_sv); + (void)ReREFCNT_inc(RExC_rx_sv); } if (RExC_parse < RExC_end && *RExC_parse == '?') { @@ -11574,7 +11574,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) ckWARN3reg(s+2, "POSIX syntax [%c %c] belongs inside character classes", c, c); - ReREFCNT_inc(RExC_rx_sv); + (void)ReREFCNT_inc(RExC_rx_sv); SvREFCNT_inc_simple_void_NN(listsv); } } @@ -11843,7 +11843,7 @@ parseit: ckWARN2reg(RExC_parse, "Unrecognized escape \\%c in character class passed through", (int)value); - ReREFCNT_inc(RExC_rx_sv); + (void)ReREFCNT_inc(RExC_rx_sv); SvREFCNT_inc_simple_void_NN(listsv); } break; @@ -11894,7 +11894,7 @@ parseit: ckWARN4reg(RExC_parse, "False [] range \"%*.*s\"", w, w, rangebegin); - ReREFCNT_inc(RExC_rx_sv); + (void)ReREFCNT_inc(RExC_rx_sv); SvREFCNT_inc_simple_void_NN(listsv); cp_list = add_cp_to_invlist(cp_list, '-'); cp_list = add_cp_to_invlist(cp_list, prevvalue); -- 2.7.4