Commit: 230f7d79ce3e82c27d91562558752fe4331b9dc2
Author: Jacques Lucke
Date:   Mon Jul 20 14:03:52 2020 +0200
Branches: master
https://developer.blender.org/rB230f7d79ce3e82c27d91562558752fe4331b9dc2

Fix signed/unsigned comparison

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

M       source/blender/blenlib/BLI_allocator.hh

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

diff --git a/source/blender/blenlib/BLI_allocator.hh 
b/source/blender/blenlib/BLI_allocator.hh
index ec82e5ab71c..d49b98cb33b 100644
--- a/source/blender/blenlib/BLI_allocator.hh
+++ b/source/blender/blenlib/BLI_allocator.hh
@@ -85,7 +85,7 @@ class RawAllocator {
     void *used_ptr = (void *)((uintptr_t)POINTER_OFFSET(ptr, alignment + 
sizeof(MemHead)) &
                               ~((uintptr_t)alignment - 1));
     int offset = (int)((uintptr_t)used_ptr - (uintptr_t)ptr);
-    BLI_assert(offset >= sizeof(MemHead));
+    BLI_assert((size_t)offset >= sizeof(MemHead));
     ((MemHead *)used_ptr - 1)->offset = (int)offset;
     return used_ptr;
   }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to