From a75517fe922033a37924bfed57b2861c9869abe0 Mon Sep 17 00:00:00 2001 From: shahramn Date: Wed, 9 Oct 2024 17:32:34 +0100 Subject: [PATCH] Fix warnings re: class_name_ is used uninitialized --- src/accessor/grib_accessor_class_divdouble.cc | 1 - src/accessor/grib_accessor_class_element.cc | 1 - src/accessor/grib_accessor_class_evaluate.cc | 1 - src/accessor/grib_accessor_class_expanded_descriptors.cc | 9 ++------- ...grib_accessor_class_from_scale_factor_scaled_value.cc | 1 - .../grib_accessor_class_g1_half_byte_codeflag.cc | 1 - src/accessor/grib_accessor_class_g2bitmap.cc | 1 - src/accessor/grib_accessor_class_g2bitmap_present.cc | 1 - src/accessor/grib_accessor_class_g2grid.cc | 5 +---- src/accessor/grib_accessor_class_gds_is_present.cc | 1 - src/accessor/grib_accessor_class_latitudes.cc | 1 - src/accessor/grib_accessor_class_raw.cc | 1 - src/accessor/grib_accessor_class_smart_table_column.cc | 1 - src/accessor/grib_accessor_class_statistics.cc | 1 - 14 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/accessor/grib_accessor_class_divdouble.cc b/src/accessor/grib_accessor_class_divdouble.cc index a2edac314..f590ca3a9 100644 --- a/src/accessor/grib_accessor_class_divdouble.cc +++ b/src/accessor/grib_accessor_class_divdouble.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * diff --git a/src/accessor/grib_accessor_class_element.cc b/src/accessor/grib_accessor_class_element.cc index dbfd0164d..ac361dac0 100644 --- a/src/accessor/grib_accessor_class_element.cc +++ b/src/accessor/grib_accessor_class_element.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * diff --git a/src/accessor/grib_accessor_class_evaluate.cc b/src/accessor/grib_accessor_class_evaluate.cc index 235d2aa9b..a8158ee96 100644 --- a/src/accessor/grib_accessor_class_evaluate.cc +++ b/src/accessor/grib_accessor_class_evaluate.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * diff --git a/src/accessor/grib_accessor_class_expanded_descriptors.cc b/src/accessor/grib_accessor_class_expanded_descriptors.cc index e8286f862..f32119a91 100644 --- a/src/accessor/grib_accessor_class_expanded_descriptors.cc +++ b/src/accessor/grib_accessor_class_expanded_descriptors.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * @@ -471,9 +470,7 @@ int grib_accessor_expanded_descriptors_t::expand() /* grib_iarray* unexp=0; */ int i; long* u = 0; - char key[50] = { - 0, - }; + char key[50] = {0,}; long centre, masterTablesVersionNumber, localTablesVersionNumber, masterTablesNumber; change_coding_params ccp; bufr_descriptors_array* unexpanded = NULL; @@ -683,9 +680,7 @@ int grib_accessor_expanded_descriptors_t::unpack_string_array(char** buffer, siz { int err = 0; long* v = NULL; - char buf[25] = { - 0, - }; + char buf[25] = {0,}; long llen = 0; size_t i = 0, size = 0; const grib_context* c = context_; diff --git a/src/accessor/grib_accessor_class_from_scale_factor_scaled_value.cc b/src/accessor/grib_accessor_class_from_scale_factor_scaled_value.cc index 4dc23e2d2..dfe77afcf 100644 --- a/src/accessor/grib_accessor_class_from_scale_factor_scaled_value.cc +++ b/src/accessor/grib_accessor_class_from_scale_factor_scaled_value.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * diff --git a/src/accessor/grib_accessor_class_g1_half_byte_codeflag.cc b/src/accessor/grib_accessor_class_g1_half_byte_codeflag.cc index 22f74e766..940a1e6d4 100644 --- a/src/accessor/grib_accessor_class_g1_half_byte_codeflag.cc +++ b/src/accessor/grib_accessor_class_g1_half_byte_codeflag.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * diff --git a/src/accessor/grib_accessor_class_g2bitmap.cc b/src/accessor/grib_accessor_class_g2bitmap.cc index ed5a8d773..6a5486981 100644 --- a/src/accessor/grib_accessor_class_g2bitmap.cc +++ b/src/accessor/grib_accessor_class_g2bitmap.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * diff --git a/src/accessor/grib_accessor_class_g2bitmap_present.cc b/src/accessor/grib_accessor_class_g2bitmap_present.cc index 385c70ec8..47c91d330 100644 --- a/src/accessor/grib_accessor_class_g2bitmap_present.cc +++ b/src/accessor/grib_accessor_class_g2bitmap_present.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * diff --git a/src/accessor/grib_accessor_class_g2grid.cc b/src/accessor/grib_accessor_class_g2grid.cc index 61788ee68..6dddc5a3f 100644 --- a/src/accessor/grib_accessor_class_g2grid.cc +++ b/src/accessor/grib_accessor_class_g2grid.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * @@ -29,9 +28,7 @@ void grib_accessor_g2grid_t::init(const long l, grib_arguments* c) basic_angle_ = grib_arguments_get_name(hand, c, n++); sub_division_ = grib_arguments_get_name(hand, c, n++); - flags_ |= - GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC | - GRIB_ACCESSOR_FLAG_READ_ONLY; + flags_ |= GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC | GRIB_ACCESSOR_FLAG_READ_ONLY; } int grib_accessor_g2grid_t::value_count(long* count) diff --git a/src/accessor/grib_accessor_class_gds_is_present.cc b/src/accessor/grib_accessor_class_gds_is_present.cc index 3d93cedae..36a2c154c 100644 --- a/src/accessor/grib_accessor_class_gds_is_present.cc +++ b/src/accessor/grib_accessor_class_gds_is_present.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * diff --git a/src/accessor/grib_accessor_class_latitudes.cc b/src/accessor/grib_accessor_class_latitudes.cc index 53a37c2a6..49976c844 100644 --- a/src/accessor/grib_accessor_class_latitudes.cc +++ b/src/accessor/grib_accessor_class_latitudes.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * diff --git a/src/accessor/grib_accessor_class_raw.cc b/src/accessor/grib_accessor_class_raw.cc index 11b434678..2196bd668 100644 --- a/src/accessor/grib_accessor_class_raw.cc +++ b/src/accessor/grib_accessor_class_raw.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * diff --git a/src/accessor/grib_accessor_class_smart_table_column.cc b/src/accessor/grib_accessor_class_smart_table_column.cc index 7cdc1193d..9c78350f5 100644 --- a/src/accessor/grib_accessor_class_smart_table_column.cc +++ b/src/accessor/grib_accessor_class_smart_table_column.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. * diff --git a/src/accessor/grib_accessor_class_statistics.cc b/src/accessor/grib_accessor_class_statistics.cc index 33259b45a..b2fc3078d 100644 --- a/src/accessor/grib_accessor_class_statistics.cc +++ b/src/accessor/grib_accessor_class_statistics.cc @@ -1,4 +1,3 @@ - /* * (C) Copyright 2005- ECMWF. *