use compatible types in a conditional expression
authorTony Cook <tony@develop-help.com>
Mon, 25 Oct 2010 00:04:23 +0000 (11:04 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 25 Oct 2010 00:04:23 +0000 (11:04 +1100)
With some compilers NULL is ((void *)0) which isn't type compatible
with the integer returned by hv_exists_ent().

cpan/ExtUtils-Constant/lib/ExtUtils/Constant/ProxySubs.pm

index c252fc3..0c04002 100644 (file)
@@ -663,7 +663,7 @@ $xs_subname(sv)
        HV *${c_subname}_missing = (C_ARRAY_LENGTH(values_for_notfound) > 1)
            ? get_missing_hash(aTHX) : NULL;
        if ((C_ARRAY_LENGTH(values_for_notfound) > 1)
-           ? hv_exists_ent(${c_subname}_missing, sv, 0) : NULL) {
+           ? hv_exists_ent(${c_subname}_missing, sv, 0) : 0) {
            sv = newSVpvf("Your vendor has not defined $package_sprintf_safe macro %" SVf
                          ", used", sv);
        } else