This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Fix compiler warning
authorKarl Williamson <public@khwilliamson.com>
Tue, 5 Oct 2010 05:15:53 +0000 (23:15 -0600)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 10 Oct 2010 21:28:07 +0000 (14:28 -0700)
Another compiler gave another warning, that this should fix.  The
expression should have been cast to a bool all along

regcomp.c

index d6f3523..2068530 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -4434,7 +4434,7 @@ Perl_re_compile(pTHX_ SV * const pattern, U32 pm_flags)
     r->extflags = pm_flags;
     {
         bool has_p     = ((r->extflags & RXf_PMf_KEEPCOPY) == RXf_PMf_KEEPCOPY);
-        bool has_charset = (r->extflags & (RXf_PMf_LOCALE|RXf_PMf_UNICODE));
+        bool has_charset = cBOOL(r->extflags & (RXf_PMf_LOCALE|RXf_PMf_UNICODE));
 
         /* The caret is output if there are any defaults: if not all the STD
          * flags are set, or if no character set specifier is needed */