diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-30 10:40:40 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-30 10:40:40 +0200 |
commit | 95ed363b1559384911ad4d41e2df305cd1f8a7fb (patch) | |
tree | e02d6ec4ab987b8e864918768be34262cc3a6f08 /Libraries/LibGfx | |
parent | 453affb1010c6d53f280d17c76bac4329abbb918 (diff) | |
download | serenity-95ed363b1559384911ad4d41e2df305cd1f8a7fb.zip |
LibGfx: Fix Lagom build (possible uninitialized variable warnings)
Diffstat (limited to 'Libraries/LibGfx')
-rw-r--r-- | Libraries/LibGfx/GIFLoader.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Libraries/LibGfx/GIFLoader.cpp b/Libraries/LibGfx/GIFLoader.cpp index 814d9679c9..15edb35c59 100644 --- a/Libraries/LibGfx/GIFLoader.cpp +++ b/Libraries/LibGfx/GIFLoader.cpp @@ -414,7 +414,9 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context) printf("color_map_entry_count: %d\n", color_map_entry_count); for (int i = 0; i < color_map_entry_count; ++i) { - u8 r, g, b; + u8 r = 0; + u8 g = 0; + u8 b = 0; stream >> r >> g >> b; context.logical_screen.color_map[i] = { r, g, b }; } @@ -522,7 +524,9 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context) size_t local_color_table_size = pow(2, (packed_fields & 7) + 1); for (size_t i = 0; i < local_color_table_size; ++i) { - u8 r, g, b; + u8 r = 0; + u8 g = 0; + u8 b = 0; stream >> r >> g >> b; image.color_map[i] = { r, g, b }; } |