This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Silence compiler warning
authorKarl Williamson <public@khwilliamson.com>
Thu, 22 Aug 2013 17:17:20 +0000 (11:17 -0600)
committerKarl Williamson <public@khwilliamson.com>
Fri, 23 Aug 2013 21:50:49 +0000 (15:50 -0600)
This call to regclass_swash() is not using its return value, so don't
store it in a variable that is otherwise unused, which causes some
compilers to complain.

regcomp.c

index 659d51f..69bb66d 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -14846,7 +14846,6 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o)
            sv_catpvs(sv, "{unicode_all}");
        else if (ANYOF_NONBITMAP(o)) {
             SV *lv; /* Set if there is something outside the bit map. */
-            SV * sw;
             bool byte_output = FALSE;   /* If something in the bitmap has been
                                            output */
 
@@ -14858,7 +14857,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o)
             }
 
             /* Get the stuff that wasn't in the bitmap */
-           sw = regclass_swash(prog, o, FALSE, &lv, NULL);
+           (void) regclass_swash(prog, o, FALSE, &lv, NULL);
            if (lv && lv != &PL_sv_undef) {
                 char *s = savesvpv(lv);
                 char * const origs = s;