The 2nd arg to save_alloc() must be cast to I32 to avoid pointer truncation warnings...
authorJan Dubois <jand@activestate.com>
Sat, 4 Jul 2009 00:56:11 +0000 (17:56 -0700)
committerDavid Mitchell <davem@iabyn.com>
Mon, 6 Jul 2009 11:31:40 +0000 (12:31 +0100)
(cherry picked from commit 6b99f28a36db89d4a6baa5b8598d15bfe4b998cb)

scope.h

diff --git a/scope.h b/scope.h
index ebfe7b3..b697676 100644 (file)
--- a/scope.h
+++ b/scope.h
@@ -217,7 +217,7 @@ Closing bracket on a callback.  See C<ENTER> and L<perlcall>.
 #define SSNEW(size)             Perl_save_alloc(aTHX_ (size), 0)
 #define SSNEWt(n,t)             SSNEW((n)*sizeof(t))
 #define SSNEWa(size,align)     Perl_save_alloc(aTHX_ (size), \
-    (align - ((int)((caddr_t)&PL_savestack[PL_savestack_ix]) % align)) % align)
+    (I32)(align - ((size_t)((caddr_t)&PL_savestack[PL_savestack_ix]) % align)) % align)
 #define SSNEWat(n,t,align)     SSNEWa((n)*sizeof(t), align)
 
 #define SSPTR(off,type)         ((type)  ((char*)PL_savestack + off))