jkhaliqi commented on code in PR #8474:
URL: https://github.com/apache/incubator-gluten/pull/8474#discussion_r1908111999
##########
cpp/core/memory/MemoryAllocator.cc:
##########
@@ -161,7 +161,7 @@ bool StdMemoryAllocator::reallocateAligned(void* p,
uint64_t alignment, int64_t
return false;
}
if (newSize <= size) {
- auto aligned = ROUND_TO_LINE(newSize, alignment);
+ auto aligned = ROUND_TO_LINE(static_cast<uint64_t> newSize, alignment);
Review Comment:
Dont Use
Cast@cpp/core/memory/[MemoryAllocator.cc:164](http://memoryallocator.cc:164/)
looks like `newSize` is `int64_t` and `alignment` is `uint64_t` so i'm
assuming there is some sort of casting that goes on when calling this function.
With that I figured they should both go in with the same type. With the above
line showing `if (newSize <= 0) {return false;}` im assuming newSize will be
positive if it gets to here so I just casted it to be `uint64_t` like the
alignment
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]