Formatting and cleanups

This commit is contained in:
shahramn 2024-10-09 17:06:45 +01:00
parent f3e370f2a1
commit 8434ba0032
16 changed files with 17 additions and 47 deletions

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*
@ -18,7 +17,7 @@ void grib_accessor_bufr_extract_area_subsets_t::init(const long len, grib_argume
{
grib_accessor_gen_t::init(len, arg);
grib_handle* h = grib_handle_of_accessor(this);
int n = 0;
int n = 0;
length_ = 0;
doExtractSubsets_ = grib_arguments_get_name(h, arg, n++);
@ -50,10 +49,10 @@ static void fill_in(double a[], long length)
int grib_accessor_bufr_extract_area_subsets_t::select_area()
{
int ret = 0;
long compressed = 0;
grib_handle* h = grib_handle_of_accessor(this);
grib_context* c = h->context;
int ret = 0;
long compressed = 0;
grib_handle* h = grib_handle_of_accessor(this);
grib_context* c = h->context;
double* lat = NULL;
double* lon = NULL;
@ -61,13 +60,9 @@ int grib_accessor_bufr_extract_area_subsets_t::select_area()
double lonWest, lonEast, latNorth, latSouth;
long numberOfSubsets, i, latRank, lonRank;
grib_iarray* subsets = NULL;
size_t nsubsets = 0;
char latstr[32] = {
0,
};
char lonstr[32] = {
0,
};
size_t nsubsets = 0;
char latstr[32] = {0,};
char lonstr[32] = {0,};
ret = grib_get_long(h, "compressedData", &compressed);
if (ret) return ret;

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*
@ -40,14 +39,13 @@ grib_accessor* grib_accessor_bufr_string_values_t::get_accessor()
int grib_accessor_bufr_string_values_t::unpack_string_array(char** buffer, size_t* len)
{
grib_accessor_bufr_data_array_t* data = 0;
grib_context* c = context_;
grib_vsarray* stringValues = NULL;
size_t l = 0, tl;
grib_context* c = context_;
grib_vsarray* stringValues = NULL;
size_t l = 0, tl;
size_t i, j, n = 0;
char** b = buffer;
data = dynamic_cast<grib_accessor_bufr_data_array_t*>(get_accessor());
grib_accessor_bufr_data_array_t* data = dynamic_cast<grib_accessor_bufr_data_array_t*>(get_accessor());
if (!data)
return GRIB_NOT_FOUND;

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*
@ -67,9 +66,7 @@ int grib_accessor_bufrdc_expanded_descriptors_t::unpack_string_array(char** buff
long lenall = 0;
size_t i = 0;
long* v = 0;
char buf[25] = {
0,
};
char buf[25] = {0,};
grib_context* c = context_;
descriptors = get_accessor();

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*
@ -105,12 +104,8 @@ int grib_accessor_codeflag_t::value_count(long* count)
void grib_accessor_codeflag_t::dump(grib_dumper* dumper)
{
long v = 0;
char flagname[1024] = {
0,
};
char fname[1024] = {
0,
};
char flagname[1024] = {0,};
char fname[1024] = {0,};
size_t llen = 1;

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*
@ -298,9 +297,7 @@ static int grib_concept_apply(grib_accessor* a, const char* name)
if (err) {
size_t i = 0, concept_count = 0;
long dummy = 0, editionNumber = 0;
char centre_s[32] = {
0,
};
char centre_s[32] = {0,};
size_t centre_len = sizeof(centre_s);
char* all_concept_vals[MAX_NUM_CONCEPT_VALUES] = {
NULL,

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*
@ -29,8 +28,7 @@ void grib_accessor_statistics_spectral_t::init(const long l, grib_arguments* c)
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
number_of_elements_ = 4;
v_ = (double*)grib_context_malloc(context_,
sizeof(double) * number_of_elements_);
v_ = (double*)grib_context_malloc(context_, sizeof(double) * number_of_elements_);
length_ = 0;
dirty_ = 1;

View File

@ -1,4 +1,3 @@
/*
* (C) Copyright 2005- ECMWF.
*