bneradt opened a new pull request, #12163:
URL: https://github.com/apache/trafficserver/pull/12163
This addresses a GCC 15 compiler warning about mismatched std operator new
and overridden operator delete in MemArena. This patch addresses the warning by
also overriding operator new for the MemArena::Block.
This is the warning being addressed:
```
lib/swoc/src/MemArena.cc: In member function
‘swoc::_1_5_14::MemArena::Block* swoc::_1_5_14::MemArena::make_block(size_t)’:
lib/swoc/src/MemArena.cc:99:44: error: ‘static void
swoc::_1_5_14::MemArena::Block::operator delete(void*, void*)’ called on
pointer returned from a mismatched allocation function [-Werror=mism
atched-new-delete]
99 | return new (::malloc(n)) Block(free_space);
| ^
src/ts_asf_master_fix_builds_for_fedora_42/lib/swoc/src/MemArena.cc:99:23:
note: returned from ‘void* malloc(size_t)’
99 | return new (::malloc(n)) Block(free_space);
| ~~~~~~~~^~~
```
--
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]