mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
AK: Explicitly initialize buffer member in ByteBuffer
When compiling the Kernel with Og, the compiler complains that m_outline_capacity might be uninitialized when calling capacity() Note that this fix is not really what we want. Ideally only outline buffer and outline capacity would need initialized, not the entire inline buffer. However, clang considers the class to not be default-constructible if we make that change, while gcc accepts it.
This commit is contained in:
parent
8146543a43
commit
6459c5a713
Notes:
sideshowbarker
2024-07-18 17:20:39 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/6459c5a713d Pull-request: https://github.com/SerenityOS/serenity/pull/7429 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/bgianfo ✅
1 changed files with 1 additions and 1 deletions
|
@ -235,7 +235,7 @@ private:
|
|||
|
||||
size_t m_size { 0 };
|
||||
union {
|
||||
u8 m_inline_buffer[inline_capacity];
|
||||
u8 m_inline_buffer[inline_capacity] {};
|
||||
struct {
|
||||
u8* m_outline_buffer;
|
||||
size_t m_outline_capacity;
|
||||
|
|
Loading…
Reference in a new issue