From: Karl Williamson Date: Fri, 18 Oct 2013 02:33:30 +0000 (-0600) Subject: PATCH [perl #120314]: fold_grind.t spews tons of warnings X-Git-Tag: upstream/5.20.0~1473 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4fcb1dc97692eaf7376c38783103c51b664ffc5;p=platform%2Fupstream%2Fperl.git PATCH [perl #120314]: fold_grind.t spews tons of warnings It turns out that fixing the compiler warnings about possible loss of data (by adding casts) silences these warnings. --- diff --git a/regcomp.c b/regcomp.c index 317094c..37890bb 100644 --- a/regcomp.c +++ b/regcomp.c @@ -4545,8 +4545,9 @@ PerlIO_printf(Perl_debug_log, "LHS=%"UVdf" RHS=%"UVdf"\n", classnum = FLAGS(scan); namedclass = classnum_to_namedclass(classnum) + invert; if (flags & SCF_DO_STCLASS_AND) { - bool was_there = ANYOF_POSIXL_TEST(data->start_class, - namedclass); + bool was_there = cBOOL( + ANYOF_POSIXL_TEST(data->start_class, + namedclass)); ANYOF_POSIXL_ZERO(data->start_class); if (was_there) { /* Do an AND */ ANYOF_POSIXL_SET(data->start_class, namedclass); @@ -7945,7 +7946,7 @@ Perl__invlist_union_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, const b if (*output == a) { if (a != NULL) { - if (! (make_temp = SvTEMP(a))) { + if (! (make_temp = cBOOL(SvTEMP(a)))) { SvREFCNT_dec_NN(a); } } @@ -7965,7 +7966,7 @@ Perl__invlist_union_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, const b else if ((len_b = _invlist_len(b)) == 0) { bool make_temp = FALSE; if (*output == b) { - if (! (make_temp = SvTEMP(b))) { + if (! (make_temp = cBOOL(SvTEMP(b)))) { SvREFCNT_dec_NN(b); } } @@ -7974,7 +7975,7 @@ Perl__invlist_union_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, const b * so the union with includes everything too */ if (complement_b) { if (a == *output) { - if (! (make_temp = SvTEMP(a))) { + if (! (make_temp = cBOOL(SvTEMP(a)))) { SvREFCNT_dec_NN(a); } } @@ -8204,7 +8205,7 @@ Perl__invlist_intersection_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, * simply 'a'. */ if (*i != a) { if (*i == b) { - if (! (make_temp = SvTEMP(b))) { + if (! (make_temp = cBOOL(SvTEMP(b)))) { SvREFCNT_dec_NN(b); } } @@ -8222,12 +8223,12 @@ Perl__invlist_intersection_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, /* Here, 'a' or 'b' is empty and not using the complement of 'b'. The * intersection must be empty */ if (*i == a) { - if (! (make_temp = SvTEMP(a))) { + if (! (make_temp = cBOOL(SvTEMP(a)))) { SvREFCNT_dec_NN(a); } } else if (*i == b) { - if (! (make_temp = SvTEMP(b))) { + if (! (make_temp = cBOOL(SvTEMP(b)))) { SvREFCNT_dec_NN(b); } }