From: Dirk Lemstra Date: Sun, 4 Aug 2019 10:04:02 +0000 (+0200) Subject: Changed variable declaration to avoid hiding previous local declaration. X-Git-Tag: 7.0.8-59~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8a05caf8850d719e90b9eb9ce6c319ed33ecd15;p=imagemagick Changed variable declaration to avoid hiding previous local declaration. --- diff --git a/MagickCore/matrix.c b/MagickCore/matrix.c index 2e595b3c4..0d59accee 100644 --- a/MagickCore/matrix.c +++ b/MagickCore/matrix.c @@ -878,8 +878,7 @@ MagickExport Image *MatrixToImage(const MatrixInfo *matrix_info, double max_value, min_value, - scale_factor, - value; + scale_factor; Image *image; @@ -899,9 +898,8 @@ MagickExport Image *MatrixToImage(const MatrixInfo *matrix_info, /* Determine range of matrix. */ - (void) GetMatrixElement(matrix_info,0,0,&value); - min_value=value; - max_value=value; + (void) GetMatrixElement(matrix_info,0,0,&min_value); + max_value=min_value; for (y=0; y < (ssize_t) matrix_info->rows; y++) { register ssize_t @@ -909,6 +907,9 @@ MagickExport Image *MatrixToImage(const MatrixInfo *matrix_info, for (x=0; x < (ssize_t) matrix_info->columns; x++) { + double + value; + if (GetMatrixElement(matrix_info,x,y,&value) == MagickFalse) continue; if (value < min_value)