dump.c: avoid compiler warning under -Dmad
authorDavid Mitchell <davem@iabyn.com>
Thu, 9 May 2013 10:55:47 +0000 (11:55 +0100)
committerDavid Mitchell <davem@iabyn.com>
Thu, 9 May 2013 10:55:47 +0000 (11:55 +0100)
this fix was already applied to the non-MAD branch; apply it to
the similar MAD / xml-dump code.

dump.c:2663:57: warning: comparison of constant 85 with expression of type
      'svtype' is always false [-Wtautological-constant-out-of-range-compare]
    else if (sv == (const SV *)0x55555555 || SvTYPE(sv) == 'U') {

dump.c

diff --git a/dump.c b/dump.c
index 13736d7..4e630ec 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -2660,7 +2660,7 @@ Perl_sv_xmlpeek(pTHX_ SV *sv)
        sv_catpv(t, "VOID=\"\"");
        goto finish;
     }
-    else if (sv == (const SV *)0x55555555 || SvTYPE(sv) == 'U') {
+    else if (sv == (const SV *)0x55555555 || ((char)SvTYPE(sv)) == 'U') {
        sv_catpv(t, "WILD=\"\"");
        goto finish;
     }