mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user