From 3f7b9dfff7c57fcf80fa8a6998e2a29d26642cb9 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 10 Jan 2022 17:36:45 -0500 Subject: [PATCH] fix cppcheck error about lo_x. Inner scope overwriting it. --- src/zm_zone.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/zm_zone.cpp b/src/zm_zone.cpp index 4fc1bf61b..29511f6bd 100644 --- a/src/zm_zone.cpp +++ b/src/zm_zone.cpp @@ -219,7 +219,7 @@ bool Zone::CheckAlarms(const Image *delta_image) { int alarm_mid_x = -1; int alarm_mid_y = -1; - unsigned int lo_x = polygon.Extent().Lo().x_; + //unsigned int lo_x = polygon.Extent().Lo().x_; unsigned int lo_y = polygon.Extent().Lo().y_; unsigned int hi_x = polygon.Extent().Hi().x_; unsigned int hi_y = polygon.Extent().Hi().y_; @@ -699,6 +699,7 @@ bool Zone::CheckAlarms(const Image *delta_image) { if ((type < PRECLUSIVE) && (check_method >= BLOBS) && (monitor->GetOptSaveJPEGs() > 1)) { + unsigned int lo_x = polygon.Extent().Lo().x_; // First mask out anything we don't want for (unsigned int y = lo_y; y <= hi_y; y++) { pdiff = diff_buff + ((diff_width * y) + lo_x);