Pacify picky VMS compiler.
Craig A. Berry [Sat, 30 Dec 2000 18:10:02 +0000 (12:10 -0600)]
Subject: perl@8269, whiny Compaq C compiler, unsigned expressions
Message-Id: <200012310010.CAA09719@tiku.hut.fi>

p4raw-id: //depot/perl@8284

sv.c

diff --git a/sv.c b/sv.c
index 3a32525..61f62a2 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -4663,17 +4663,23 @@ Perl_sv_eq(pTHX_ register SV *sv1, register SV *sv2)
 
        if (SvUTF8(sv1)) {
            (void)utf8_to_bytes((U8*)(pv1 = savepvn(pv1, cur1)), &cur1);
-           if (cur1 < 0) {
-               Safefree(pv1);
-               return 0;
+           {
+               IV scur1 = cur1;
+               if (scur1 < 0) {
+                   Safefree(pv1);
+                   return 0;
+               }
            }
            pv1tmp = TRUE;
        }
        else {
            (void)utf8_to_bytes((U8*)(pv2 = savepvn(pv2, cur2)), &cur2);
-           if (cur2 < 0) {
-               Safefree(pv2);
-               return 0;
+           {
+               IV scur2 = cur2;
+               if (scur2 < 0) {
+                   Safefree(pv2);
+                   return 0;
+               }
            }
            pv2tmp = TRUE;
        }