This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Do not declare victory over d632a2c.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 17 Jun 2014 12:23:04 +0000 (08:23 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 17 Jun 2014 12:24:36 +0000 (08:24 -0400)
The same warning seems to pop in Android.  Needs more study.

op.c

diff --git a/op.c b/op.c
index b232de8..da39092 100644 (file)
--- a/op.c
+++ b/op.c
@@ -11707,15 +11707,7 @@ Perl_custom_op_get_field(pTHX_ const OP *o, const xop_flags_enum field)
            if(flags & field) {
                switch(field) {
                case XOPe_xop_name:
-                    /* Some gcc releases emit a warning for this function:
-                     * op.c: In function 'Perl_custom_op_get_field':
-                     * op.c:...: warning: 'any.xop_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
-                     * This does seem to be a false warning: the xop,
-                     * including xop_name, does get initialized on all
-                     * execution paths. */
-                    GCC_DIAG_IGNORE(-Wmaybe-uninitialized);
                    any.xop_name = xop->xop_name;
-                    GCC_DIAG_RESTORE;
                    break;
                case XOPe_xop_desc:
                    any.xop_desc = xop->xop_desc;
@@ -11750,6 +11742,10 @@ Perl_custom_op_get_field(pTHX_ const OP *o, const xop_flags_enum field)
                }
            }
        }
+        /* Some gcc releases emit a warning for this function:
+         * op.c: In function 'Perl_custom_op_get_field':
+         * op.c:...: warning: 'any.xop_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
+         * Whether this is true, is currently unknown *./
        return any;
     }
 }