In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/950c540d858c1ac2d433513ee5aeae7a059dbca0?hp=14975c4165fc5ce9497b8d4867b890ea7f7721a9>

- Log -----------------------------------------------------------------
commit 950c540d858c1ac2d433513ee5aeae7a059dbca0
Author: Jarkko Hietaniemi <[email protected]>
Date:   Fri Dec 5 20:16:54 2014 -0500

    Unused expression + variable.

M       ext/XS-APItest/APItest.xs

commit 50495f394177d692fdc9b5b859c8cdb1275a1262
Author: Jarkko Hietaniemi <[email protected]>
Date:   Fri Dec 5 20:14:20 2014 -0500

    Some versions of gcc -Wextra are too paranoid about { 0 }.

M       ext/XS-APItest/APItest.xs

commit 7f4bfd0b8b3f56f97734ae34e393ab217d243929
Author: Jarkko Hietaniemi <[email protected]>
Date:   Fri Dec 5 20:04:08 2014 -0500

    POSIX math potentially unused vars.

M       ext/POSIX/POSIX.xs
-----------------------------------------------------------------------

Summary of changes:
 ext/POSIX/POSIX.xs        | 26 ++++++++++++++++++++------
 ext/XS-APItest/APItest.xs | 10 ++++++++--
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 81dc18b..66c8dcc 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -2139,6 +2139,7 @@ acos(x)
        y0 = 29
        y1 = 30
     CODE:
+       PERL_UNUSED_VAR(x);
        RETVAL = NV_NAN;
        switch (ix) {
        case 0:
@@ -2360,6 +2361,7 @@ fesetround(x)
         default: RETVAL = -1; break;
        }
 #else
+       PERL_UNUSED_VAR(x);
        RETVAL = -1;
        not_here("fesetround");
 #endif
@@ -2379,6 +2381,7 @@ fpclassify(x)
        lround = 7
         signbit = 8
     CODE:
+        PERL_UNUSED_VAR(x);
        RETVAL = -1;
        switch (ix) {
        case 0:
@@ -2457,6 +2460,8 @@ copysign(x,y)
        nexttoward = 13
        remainder = 14
     CODE:
+        PERL_UNUSED_VAR(x);
+        PERL_UNUSED_VAR(y);
        RETVAL = NV_NAN;
        switch (ix) {
        case 0:
@@ -2556,9 +2561,9 @@ copysign(x,y)
        case 14:
        default:
 #ifdef c99_remainder
-           RETVAL = c99_remainder(x, y);
+          RETVAL = c99_remainder(x, y);
 #else
-           not_here("remainder");
+          not_here("remainder");
 #endif
            break;
        }
@@ -2598,6 +2603,8 @@ remquo(x,y)
         PUSHs(sv_2mortal(newSVnv(c99_remquo(x,y,&intvar))));
         PUSHs(sv_2mortal(newSVnv(intvar)));
 #else
+       PERL_UNUSED_VAR(x);
+       PERL_UNUSED_VAR(y);
        not_here("remquo");
 #endif
 
@@ -2609,6 +2616,8 @@ scalbn(x,y)
 #ifdef c99_scalbn
        RETVAL = c99_scalbn(x, y);
 #else
+       PERL_UNUSED_VAR(x);
+       PERL_UNUSED_VAR(y);
        RETVAL = NV_NAN;
        not_here("scalbn");
 #endif
@@ -2622,6 +2631,9 @@ fma(x,y,z)
        NV              z
     CODE:
 #ifdef c99_fma
+       PERL_UNUSED_VAR(x);
+       PERL_UNUSED_VAR(y);
+       PERL_UNUSED_VAR(z);
        RETVAL = c99_fma(x, y, z);
 #endif
     OUTPUT:
@@ -2651,21 +2663,23 @@ jn(x,y)
     ALIAS:
        yn = 1
     CODE:
+       PERL_UNUSED_VAR(x);
+       PERL_UNUSED_VAR(y);
        RETVAL = NV_NAN;
         switch (ix) {
        case 0:
 #ifdef bessel_jn
-           RETVAL = bessel_jn(x, y);
+          RETVAL = bessel_jn(x, y);
 #else
-           not_here("jn");
+          not_here("jn");
 #endif
             break;
        case 1:
        default:
 #ifdef bessel_yn
-           RETVAL = bessel_yn(x, y);
+          RETVAL = bessel_yn(x, y);
 #else
-           not_here("yn");
+          not_here("yn");
 #endif
             break;
        }
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index 9f8e0a3..2eee100 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -259,7 +259,12 @@ rmagical_a_dummy(pTHX_ IV idx, SV *sv) {
     return 0;
 }
 
-STATIC MGVTBL rmagical_b = { 0 };
+/* We could do "= { 0 };" but some versions of gcc do warn
+ * (with -Wextra) about missing initializer, this is probably gcc
+ * being a bit too paranoid.  But since this is file-static, we can
+ * just have it without initializer, since it should get
+ * zero-initialized. */
+STATIC MGVTBL rmagical_b;
 
 STATIC void
 blockhook_csc_start(pTHX_ int full)
@@ -1261,7 +1266,8 @@ assertx(int x)
     CODE:
         /* this only needs to compile and checks that assert() can be
            used this way syntactically */
-        (assert(x),1);
+       (void)(assert(x), 1);
+       (void)(x);
 
 MODULE = XS::APItest::utf8     PACKAGE = XS::APItest::utf8
 

--
Perl5 Master Repository

Reply via email to