mirror of https://github.com/ecmwf/eccodes.git
Dead code removal: Unused data members
This commit is contained in:
parent
0f8c13ae3e
commit
6e00d55add
|
@ -1,117 +0,0 @@
|
||||||
/*
|
|
||||||
* (C) Copyright 2005- ECMWF.
|
|
||||||
*
|
|
||||||
* This software is licensed under the terms of the Apache Licence Version 2.0
|
|
||||||
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
|
||||||
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*****************************************************************
|
|
||||||
* Enrico Fucile
|
|
||||||
**************************************************************/
|
|
||||||
#include "grib_api_internal.h"
|
|
||||||
/*
|
|
||||||
This is used by make_class.pl
|
|
||||||
|
|
||||||
START_CLASS_DEF
|
|
||||||
CLASS = accessor
|
|
||||||
SUPER = grib_accessor_class_gen
|
|
||||||
IMPLEMENTS = init;dump
|
|
||||||
MEMBERS = grib_action* *builder
|
|
||||||
MEMBERS = grib_block_of_accessors *block;
|
|
||||||
END_CLASS_DEF
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* START_CLASS_IMP */
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
Don't edit anything between START_CLASS_IMP and END_CLASS_IMP
|
|
||||||
Instead edit values between START_CLASS_DEF and END_CLASS_DEF
|
|
||||||
or edit "accessor.class" and rerun ./make_class.pl
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void dump(grib_accessor*, grib_dumper*);
|
|
||||||
static void init(grib_accessor*, const long, grib_arguments*);
|
|
||||||
|
|
||||||
typedef struct grib_accessor_array
|
|
||||||
{
|
|
||||||
grib_accessor att;
|
|
||||||
/* Members defined in gen */
|
|
||||||
/* Members defined in array */
|
|
||||||
grib_action* *builder;
|
|
||||||
grib_block_of_accessors *block;
|
|
||||||
} grib_accessor_array;
|
|
||||||
|
|
||||||
extern grib_accessor_class* grib_accessor_class_gen;
|
|
||||||
|
|
||||||
static grib_accessor_class _grib_accessor_class_array = {
|
|
||||||
&grib_accessor_class_gen, /* super */
|
|
||||||
"array", /* name */
|
|
||||||
sizeof(grib_accessor_array), /* size */
|
|
||||||
0, /* inited */
|
|
||||||
0, /* init_class */
|
|
||||||
&init, /* init */
|
|
||||||
0, /* post_init */
|
|
||||||
0, /* destroy */
|
|
||||||
&dump, /* dump */
|
|
||||||
0, /* next_offset */
|
|
||||||
0, /* get length of string */
|
|
||||||
0, /* get number of values */
|
|
||||||
0, /* get number of bytes */
|
|
||||||
0, /* get offset to bytes */
|
|
||||||
0, /* get native type */
|
|
||||||
0, /* get sub_section */
|
|
||||||
0, /* pack_missing */
|
|
||||||
0, /* is_missing */
|
|
||||||
0, /* pack_long */
|
|
||||||
0, /* unpack_long */
|
|
||||||
0, /* pack_double */
|
|
||||||
0, /* pack_float */
|
|
||||||
0, /* unpack_double */
|
|
||||||
0, /* unpack_float */
|
|
||||||
0, /* pack_string */
|
|
||||||
0, /* unpack_string */
|
|
||||||
0, /* pack_string_array */
|
|
||||||
0, /* unpack_string_array */
|
|
||||||
0, /* pack_bytes */
|
|
||||||
0, /* unpack_bytes */
|
|
||||||
0, /* pack_expression */
|
|
||||||
0, /* notify_change */
|
|
||||||
0, /* update_size */
|
|
||||||
0, /* preferred_size */
|
|
||||||
0, /* resize */
|
|
||||||
0, /* nearest_smaller_value */
|
|
||||||
0, /* next accessor */
|
|
||||||
0, /* compare vs. another accessor */
|
|
||||||
0, /* unpack only ith value (double) */
|
|
||||||
0, /* unpack only ith value (float) */
|
|
||||||
0, /* unpack a given set of elements (double) */
|
|
||||||
0, /* unpack a given set of elements (float) */
|
|
||||||
0, /* unpack a subarray */
|
|
||||||
0, /* clear */
|
|
||||||
0, /* clone accessor */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
grib_accessor_class* grib_accessor_class_array = &_grib_accessor_class_array;
|
|
||||||
|
|
||||||
/* END_CLASS_IMP */
|
|
||||||
|
|
||||||
|
|
||||||
static void init(grib_accessor* a, const long len, grib_arguments* arg)
|
|
||||||
{
|
|
||||||
grib_accessor_array* self = (grib_accessor_array*)a;
|
|
||||||
self->block = (grib_block_of_accessors*)grib_context_malloc_clear(a->context, sizeof(grib_block_of_accessors));
|
|
||||||
a->length = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void dump(grib_accessor* a, grib_dumper* dumper)
|
|
||||||
{
|
|
||||||
grib_accessor_array* self = (grib_accessor_array*)a;
|
|
||||||
grib_dump_section(dumper, a, self->block);
|
|
||||||
}
|
|
|
@ -2491,7 +2491,7 @@ static int create_keys(const grib_accessor* a, long onlySubset, long startSubset
|
||||||
groupNumber = 1;
|
groupNumber = 1;
|
||||||
|
|
||||||
gaGroup = grib_accessor_factory(self->dataKeys, &creatorGroup, 0, NULL);
|
gaGroup = grib_accessor_factory(self->dataKeys, &creatorGroup, 0, NULL);
|
||||||
gaGroup->bufr_group_number = groupNumber;
|
//gaGroup->bufr_group_number = groupNumber;
|
||||||
gaGroup->sub_section = grib_section_create(hand, gaGroup);
|
gaGroup->sub_section = grib_section_create(hand, gaGroup);
|
||||||
section = gaGroup->sub_section;
|
section = gaGroup->sub_section;
|
||||||
/*rootSection=section;*/
|
/*rootSection=section;*/
|
||||||
|
@ -2557,7 +2557,7 @@ static int create_keys(const grib_accessor* a, long onlySubset, long startSubset
|
||||||
|
|
||||||
gaGroup = grib_accessor_factory(groupSection, &creatorGroup, 0, NULL);
|
gaGroup = grib_accessor_factory(groupSection, &creatorGroup, 0, NULL);
|
||||||
gaGroup->sub_section = grib_section_create(hand, gaGroup);
|
gaGroup->sub_section = grib_section_create(hand, gaGroup);
|
||||||
gaGroup->bufr_group_number = groupNumber;
|
//gaGroup->bufr_group_number = groupNumber;
|
||||||
|
|
||||||
//accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG);
|
//accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG);
|
||||||
//accessor_constant_set_dval(gaGroup, groupNumber);
|
//accessor_constant_set_dval(gaGroup, groupNumber);
|
||||||
|
@ -2602,7 +2602,7 @@ static int create_keys(const grib_accessor* a, long onlySubset, long startSubset
|
||||||
}
|
}
|
||||||
gaGroup = grib_accessor_factory(groupSection, &creatorGroup, 0, NULL);
|
gaGroup = grib_accessor_factory(groupSection, &creatorGroup, 0, NULL);
|
||||||
gaGroup->sub_section = grib_section_create(hand, gaGroup);
|
gaGroup->sub_section = grib_section_create(hand, gaGroup);
|
||||||
gaGroup->bufr_group_number = groupNumber;
|
// gaGroup->bufr_group_number = groupNumber;
|
||||||
//accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG);
|
//accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG);
|
||||||
//accessor_constant_set_dval(gaGroup, groupNumber);
|
//accessor_constant_set_dval(gaGroup, groupNumber);
|
||||||
grib_push_accessor(gaGroup, groupSection->block);
|
grib_push_accessor(gaGroup, groupSection->block);
|
||||||
|
|
|
@ -548,8 +548,6 @@ struct grib_accessor
|
||||||
|
|
||||||
grib_accessor* same; /** < accessors with the same name */
|
grib_accessor* same; /** < accessors with the same name */
|
||||||
long loop; /** < used in lists */
|
long loop; /** < used in lists */
|
||||||
long bufr_subset_number; /** < bufr subset (bufr data accessors belong to different subsets)*/
|
|
||||||
long bufr_group_number; /** < used in bufr */
|
|
||||||
grib_virtual_value* vvalue; /** < virtual value used when transient flag on **/
|
grib_virtual_value* vvalue; /** < virtual value used when transient flag on **/
|
||||||
const char* set;
|
const char* set;
|
||||||
grib_accessor* attributes[MAX_ACCESSOR_ATTRIBUTES]; /** < attributes are accessors */
|
grib_accessor* attributes[MAX_ACCESSOR_ATTRIBUTES]; /** < attributes are accessors */
|
||||||
|
@ -884,8 +882,6 @@ struct grib_handle
|
||||||
char* section_length[MAX_NUM_SECTIONS];
|
char* section_length[MAX_NUM_SECTIONS];
|
||||||
int sections_count;
|
int sections_count;
|
||||||
off_t offset;
|
off_t offset;
|
||||||
long bufr_subset_number; /* bufr subset number */
|
|
||||||
long bufr_group_number; /* used in bufr */
|
|
||||||
/* grib_accessor* groups[MAX_NUM_GROUPS]; */
|
/* grib_accessor* groups[MAX_NUM_GROUPS]; */
|
||||||
long missingValueLong;
|
long missingValueLong;
|
||||||
double missingValueDouble;
|
double missingValueDouble;
|
||||||
|
|
Loading…
Reference in New Issue