diff --git a/AK/Utf8View.cpp b/AK/Utf8View.cpp index 885721f7e98..90b56be2a59 100644 --- a/AK/Utf8View.cpp +++ b/AK/Utf8View.cpp @@ -152,7 +152,7 @@ Utf8CodepointIterator& Utf8CodepointIterator::operator++() { ASSERT(m_length > 0); - int codepoint_length_in_bytes; + int codepoint_length_in_bytes = 0; u32 value; bool first_byte_makes_sense = decode_first_byte(*m_ptr, codepoint_length_in_bytes, value); @@ -169,7 +169,7 @@ Utf8CodepointIterator& Utf8CodepointIterator::operator++() int Utf8CodepointIterator::codepoint_length_in_bytes() const { ASSERT(m_length > 0); - int codepoint_length_in_bytes; + int codepoint_length_in_bytes = 0; u32 value; bool first_byte_makes_sense = decode_first_byte(*m_ptr, codepoint_length_in_bytes, value); ASSERT(first_byte_makes_sense); @@ -180,8 +180,8 @@ u32 Utf8CodepointIterator::operator*() const { ASSERT(m_length > 0); - u32 codepoint_value_so_far; - int codepoint_length_in_bytes; + u32 codepoint_value_so_far = 0; + int codepoint_length_in_bytes = 0; bool first_byte_makes_sense = decode_first_byte(m_ptr[0], codepoint_length_in_bytes, codepoint_value_so_far); if (!first_byte_makes_sense) { diff --git a/Libraries/LibGfx/Color.cpp b/Libraries/LibGfx/Color.cpp index 32a0e1b7f1e..de5e8eb69ef 100644 --- a/Libraries/LibGfx/Color.cpp +++ b/Libraries/LibGfx/Color.cpp @@ -352,7 +352,7 @@ const LogStream& operator<<(const LogStream& stream, Color value) bool IPC::decode(BufferStream& stream, Color& color) { - u32 rgba; + u32 rgba = 0; stream >> rgba; if (stream.handle_read_failure()) return false; diff --git a/Libraries/LibGfx/GIFLoader.cpp b/Libraries/LibGfx/GIFLoader.cpp index c958694e92b..2f92afe67e7 100644 --- a/Libraries/LibGfx/GIFLoader.cpp +++ b/Libraries/LibGfx/GIFLoader.cpp @@ -200,7 +200,7 @@ RefPtr load_gif_impl(const u8* data, size_t data_size) if (sentinel == 0x2c) { images.append(make()); auto& image = images.last(); - u8 packed_fields; + u8 packed_fields { 0 }; stream >> image.x; stream >> image.y; stream >> image.width; diff --git a/Libraries/LibGfx/Point.cpp b/Libraries/LibGfx/Point.cpp index e97d883db0f..2371e75cb77 100644 --- a/Libraries/LibGfx/Point.cpp +++ b/Libraries/LibGfx/Point.cpp @@ -46,8 +46,8 @@ namespace IPC { bool decode(BufferStream& stream, Gfx::Point& point) { - int x; - int y; + int x = 0; + int y = 0; stream >> x; stream >> y; if (stream.handle_read_failure()) diff --git a/Libraries/LibGfx/Size.cpp b/Libraries/LibGfx/Size.cpp index 39f6868e5d0..6274e2be8f0 100644 --- a/Libraries/LibGfx/Size.cpp +++ b/Libraries/LibGfx/Size.cpp @@ -46,8 +46,8 @@ namespace IPC { bool decode(BufferStream& stream, Gfx::Size& size) { - int width; - int height; + int width = 0; + int height = 0; stream >> width; stream >> height; if (stream.handle_read_failure())