This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
B.xs: silence clang warning
authorDavid Mitchell <davem@iabyn.com>
Thu, 13 Dec 2012 13:24:58 +0000 (13:24 +0000)
committerDavid Mitchell <davem@iabyn.com>
Thu, 13 Dec 2012 14:19:35 +0000 (14:19 +0000)
PADOFFSET is unsigned, so checking that it's >= 0 is pointless.

ext/B/B.xs

index 1a6e257..bf7e9b1 100644 (file)
@@ -1942,7 +1942,7 @@ PadlistARRAYelt(padlist, idx)
        B::PADLIST      padlist
        PADOFFSET       idx
     PPCODE:
        B::PADLIST      padlist
        PADOFFSET       idx
     PPCODE:
-       if (idx >= 0 && PadlistMAX(padlist) >= 0
+       if (PadlistMAX(padlist) >= 0
         && idx <= PadlistMAX(padlist))
            XPUSHs(make_sv_object(aTHX_
                                  (SV *)PadlistARRAY(padlist)[idx]));
         && idx <= PadlistMAX(padlist))
            XPUSHs(make_sv_object(aTHX_
                                  (SV *)PadlistARRAY(padlist)[idx]));