From 9877fa50588562dad07296e2f113986ef59d9a18 Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Sun, 29 Oct 2023 22:50:56 -0700 Subject: [PATCH] Fix uninitialized variable in Image::fix_alpha_edges() `core\io\image.cpp:3776:33: error: 'closest_color[0]' may be used uninitialized [-Werror=maybe-uninitialized]` --- core/io/image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/io/image.cpp b/core/io/image.cpp index 15d0182dfc..ce08b417a8 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -3773,7 +3773,7 @@ void Image::fix_alpha_edges() { } int closest_dist = max_dist; - uint8_t closest_color[3]; + uint8_t closest_color[3] = { 0 }; int from_x = MAX(0, j - max_radius); int to_x = MIN(width - 1, j + max_radius);