Bugfix: grpc supress incorrect warning (#8669)

new_p is a local addr but is owned now by slice_
thus the life time does not end at the end of the function

Co-authored-by: Wouter van Oortmerssen <aardappel@gmail.com>
This commit is contained in:
Felix
2025-08-28 23:27:31 +02:00
committed by GitHub
parent 1e6c851dba
commit b87d04af8c

View File

@@ -121,7 +121,7 @@ class SliceAllocator : public Allocator {
memcpy_downward(old_p, old_size, new_p, new_size, in_use_back,
in_use_front);
slice_ = new_slice;
return new_p;
return const_cast<uint8_t *>(slice_.begin());
}
private: