From 0322b4621d43e1a9a8f02fc93a9cb0dee1c898bc Mon Sep 17 00:00:00 2001 From: zanaviska <31745527+zanaviska@users.noreply.github.com> Date: Sun, 21 Jan 2024 14:52:42 +0000 Subject: [PATCH] Fix gcc11 warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‘error’ may be used uninitialized --- modules/ximgproc/src/edge_drawing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ximgproc/src/edge_drawing.cpp b/modules/ximgproc/src/edge_drawing.cpp index 4ff15324b70..fab94fc6336 100644 --- a/modules/ximgproc/src/edge_drawing.cpp +++ b/modules/ximgproc/src/edge_drawing.cpp @@ -1366,7 +1366,7 @@ void EdgeDrawingImpl::SplitSegment2Lines(double* x, double* y, int noPixels, int { // Start by fitting a line to MIN_LINE_LEN pixels bool valid = false; - double lastA(0), lastB(0), error; + double lastA(0), lastB(0), error(0); int lastInvert(0); while (noPixels >= min_line_len)