[Bf-blender-cvs] [7e20583] master: Attempt to fix sign conversion error happening on buildbot

Sergey Sharybin noreply at git.blender.org
Fri Jun 13 23:35:28 CEST 2014


Commit: 7e205836884e892995105518791ab49816da37ef
Author: Sergey Sharybin
Date:   Sat Jun 14 03:34:30 2014 +0600
https://developer.blender.org/rB7e205836884e892995105518791ab49816da37ef

Attempt to fix sign conversion error happening on buildbot

===================================================================

M	intern/guardedalloc/intern/mallocn_guarded_impl.c

===================================================================

diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c b/intern/guardedalloc/intern/mallocn_guarded_impl.c
index 206390e..6e32844 100644
--- a/intern/guardedalloc/intern/mallocn_guarded_impl.c
+++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c
@@ -548,7 +548,7 @@ void *MEM_guarded_mallocN_aligned(size_t len, size_t alignment, const char *str)
 	 * We only support small alignments which fits into short in
 	 * order to save some bits in MemHead structure.
 	 */
-	short extra_padding = (short)MEMHEAD_ALIGN_PADDING(alignment);
+	size_t extra_padding = MEMHEAD_ALIGN_PADDING(alignment);
 
 	/* Huge alignment values doesn't make sense and they
 	 * wouldn't fit into 'short' used in the MemHead.
@@ -560,7 +560,7 @@ void *MEM_guarded_mallocN_aligned(size_t len, size_t alignment, const char *str)
 
 	len = SIZET_ALIGN_4(len);
 
-	memh = (MemHead *)aligned_malloc(len + (size_t)extra_padding + sizeof(MemHead) + sizeof(MemTail), alignment);
+	memh = (MemHead *)aligned_malloc(len + extra_padding + sizeof(MemHead) + sizeof(MemTail), alignment);
 
 	if (LIKELY(memh)) {
 		/* We keep padding in the beginning of MemHead,




More information about the Bf-blender-cvs mailing list