From 6b99f28a36db89d4a6baa5b8598d15bfe4b998cb Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Fri, 3 Jul 2009 17:56:11 -0700 Subject: [PATCH] The 2nd arg to save_alloc() must be cast to I32 to avoid pointer truncation warnings on 64-bit platforms. --- scope.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scope.h b/scope.h index 97e0d7a..2b57fc6 100644 --- a/scope.h +++ b/scope.h @@ -218,7 +218,7 @@ Closing bracket on a callback. See C and L. #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)) -- 2.7.4