From 185b49fa841809d6348da7484869c40cf4cb8fe4 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 12 Feb 2020 17:46:25 +0000 Subject: [PATCH] Clang static analyser: Dead assignment --- src/grib_accessor_class_data_2order_packing.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/grib_accessor_class_data_2order_packing.c b/src/grib_accessor_class_data_2order_packing.c index 53381762f..5d10fc9ef 100644 --- a/src/grib_accessor_class_data_2order_packing.c +++ b/src/grib_accessor_class_data_2order_packing.c @@ -455,9 +455,6 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) double s = 0; double d = 0; - double max = 0; - double min = 0; - unsigned long* sec_val = NULL; long ref_vals = 0; short n_sp_diff = 0; @@ -652,7 +649,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) for (i = 0; i < n_vals; i++) val[i] = (double)((((double)sec_val[i]) * s) + reference_value) * d; - max = val[0]; + /*max = val[0]; min = max; for (i = 0; i < n_vals; i++) { if (val[i] > max) @@ -661,7 +658,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) min = val[i]; } min *= d; - max *= d; + max *= d;*/ grib_context_free(a->context, sec_val); if (bitmap != NULL)