From c1c3d106201da324dd11615b3dc8a3e9918f34af Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 23 Mar 2020 11:52:50 +0000 Subject: [PATCH] Clang static analyser warnings --- src/grib_accessor_class_bufr_data_array.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/grib_accessor_class_bufr_data_array.c b/src/grib_accessor_class_bufr_data_array.c index 2f582180f..4767dee8f 100644 --- a/src/grib_accessor_class_bufr_data_array.c +++ b/src/grib_accessor_class_bufr_data_array.c @@ -2953,7 +2953,8 @@ static int process_elements(grib_accessor* a, int flag, long onlySubset, long st numberOfNestedRepetitions = 0; for (i = 0; i < numberOfDescriptors; i++) { - grib_context_log(c, GRIB_LOG_DEBUG, "BUFR data processing: elementNumber=%ld code=%6.6ld", icount++, descriptors[i]->code); + if (c->debug && descriptors) + grib_context_log(c, GRIB_LOG_DEBUG, "BUFR data processing: elementNumber=%ld code=%6.6ld", icount++, descriptors[i]->code); switch (descriptors[i]->F) { case 0: /* Table B element */