This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Cast to signed before negating, to avoid compiler warnings
[perl5.git] / ext / mro / mro.xs
index 1f099cb..7b5a86d 100644 (file)
@@ -643,7 +643,7 @@ mro__nextcan(...)
             assert(curstash);
 
             gvp = (GV**)hv_fetch(curstash, subname,
             assert(curstash);
 
             gvp = (GV**)hv_fetch(curstash, subname,
-                                    subname_utf8 ? -subname_len : subname_len, 0);
+                                    subname_utf8 ? -(I32)subname_len : (I32)subname_len, 0);
             if (!gvp) continue;
 
             candidate = *gvp;
             if (!gvp) continue;
 
             candidate = *gvp;