diff --git a/src/grib_accessor_class_concept.cc b/src/grib_accessor_class_concept.cc index f280ea39d..5f2c13cc0 100644 --- a/src/grib_accessor_class_concept.cc +++ b/src/grib_accessor_class_concept.cc @@ -593,53 +593,6 @@ static void destroy(grib_context* c, grib_accessor* a) //grib_context_free(c,self->cval); } -// static int is_local_ecmwf_grib2_param_key(grib_accessor* a, long edition, long centre) -// { -// if (edition == 2 && centre == 98) { -// if (a->parent->owner && a->parent->owner->name && strcmp(a->parent->owner->name, "parameters") == 0) -// return 1; -// } -// return 0; -// } - -// /* Try to get the name, shortName, units etc for a GRIB2 message with -// * local ECMWF coding i.e. discipline=192 etc -// */ -// static const char* get_ECMWF_local_parameter(grib_accessor* a, grib_handle* h) -// { -// int err = 0; -// const char* key_name = a->name; /*this is the key whose value we want*/ -// long edition, centre; -// if (h->product_kind != PRODUCT_GRIB) -// return NULL; -// err = grib_get_long(h, "centre", ¢re); -// if (err) -// return NULL; -// err = grib_get_long(h, "edition", &edition); -// if (err) -// return NULL; -// if (is_local_ecmwf_grib2_param_key(a, edition, centre)) { -// /* Must be one of: 'name', 'shortName', 'units', 'cfName' etc */ -// grib_accessor* a2 = NULL; -// const long pid_guess = guess_paramId(h); -// if (pid_guess == -1) -// return NULL; - -// /* Change the paramId so we can get the other string key*/ -// err = grib_set_long(h, "paramId", pid_guess); -// if (err) -// return NULL; -// /* Get the string value of key. Do not call grib_get_string() to avoid -// * dangers of infinite recursion as that calls unpack_string()! -// */ -// a2 = grib_find_accessor(h, key_name); -// if (!a2) -// return NULL; -// return concept_evaluate(a2); -// } -// return NULL; -// } - static int unpack_string(grib_accessor* a, char* val, size_t* len) { size_t slen; diff --git a/src/grib_accessor_class_count_missing.cc b/src/grib_accessor_class_count_missing.cc index be7e56d45..46680b92f 100644 --- a/src/grib_accessor_class_count_missing.cc +++ b/src/grib_accessor_class_count_missing.cc @@ -133,26 +133,6 @@ static const unsigned char bitsoff[] = { 0 }; -/* -static const unsigned char bitson[]={ -0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, -2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, -2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, -4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, -2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, -4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, -4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, -6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, -2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, -4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, -4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, -6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, -4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, -6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, -6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, -8 }; -*/ - static void init(grib_accessor* a, const long len, grib_arguments* arg) { int n = 0; diff --git a/src/grib_accessor_class_expanded_descriptors.cc b/src/grib_accessor_class_expanded_descriptors.cc index 4cceae5d8..c019a40f6 100644 --- a/src/grib_accessor_class_expanded_descriptors.cc +++ b/src/grib_accessor_class_expanded_descriptors.cc @@ -837,10 +837,9 @@ static int value_count(grib_accessor* a, long* rlen) static void destroy(grib_context* c, grib_accessor* a) { - /* grib_accessor_expanded_descriptors* self = (grib_accessor_expanded_descriptors*)a; */ - /* if (self->rank==0 && self->expanded) { */ - /* grib_bufr_descriptors_array_delete(self->expanded); */ - /* } */ + // grib_accessor_expanded_descriptors* self = (grib_accessor_expanded_descriptors*)a; + // if (self->rank==0 && self->expanded) + // grib_bufr_descriptors_array_delete(self->expanded); } static int get_native_type(grib_accessor* a) diff --git a/src/grib_accessor_class_g1_message_length.cc b/src/grib_accessor_class_g1_message_length.cc index 2e7ed7d07..5ee61dd0d 100644 --- a/src/grib_accessor_class_g1_message_length.cc +++ b/src/grib_accessor_class_g1_message_length.cc @@ -200,10 +200,8 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) /* Do not do the length checks in this special case */ if ((ret = pack_long_unsigned_helper(a, &tlen, len, /*check=*/0)) != GRIB_SUCCESS) return ret; - /* - if((ret = super->pack_long(a,&tlen,len)) != GRIB_SUCCESS) - return ret; - */ + + // if((ret = super->pack_long(a,&tlen,len)) != GRIB_SUCCESS) return ret; { long total_length = -1, sec4_length = -1; diff --git a/src/grib_accessor_class_latlon_increment.cc b/src/grib_accessor_class_latlon_increment.cc index faf62d864..672a7df3c 100644 --- a/src/grib_accessor_class_latlon_increment.cc +++ b/src/grib_accessor_class_latlon_increment.cc @@ -293,10 +293,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) } } - /*ret = grib_set_long_internal(hand, self->numberOfPoints,numberOfPoints); - if(ret) - grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot pack value for %s error %d \n", a->name, self->numberOfPoints, ret); - */ + //ret = grib_set_long_internal(hand, self->numberOfPoints,numberOfPoints); + //if(ret) grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot pack value for %s error %d \n", a->name, self->numberOfPoints, ret); grib_get_long_internal(hand, self->numberOfPoints, &codedNumberOfPoints); diff --git a/src/grib_accessor_class_variable.cc b/src/grib_accessor_class_variable.cc index d78fe8174..3d5aa6766 100644 --- a/src/grib_accessor_class_variable.cc +++ b/src/grib_accessor_class_variable.cc @@ -346,21 +346,6 @@ static long byte_count(grib_accessor* a) return a->length; } -/* NOT ANY MORE -static long byte_count(grib_accessor* a) { - grib_accessor_variable *self = (grib_accessor_variable*)a; - char buf[80]={0,}; - - if(self->type == GRIB_TYPE_STRING) { - return strlen(self->cval) +1; - } else { - snprintf(buf,64,"%g",self->dval); - printf("========> \"%s\"\n",buf); - return strlen(buf)+1; - } -} -*/ - static int compare(grib_accessor* a, grib_accessor* b) { int retval = 0; diff --git a/src/grib_accessor_classes_hash.cc b/src/grib_accessor_classes_hash.cc index ad2e71d8b..a27a7a7a0 100644 --- a/src/grib_accessor_classes_hash.cc +++ b/src/grib_accessor_classes_hash.cc @@ -51,8 +51,7 @@ struct accessor_class_hash { char *name; grib_accessor_class **cclass;}; #endif #endif -static unsigned int -grib_accessor_classes_get_id (const char *str, size_t len) +static unsigned int grib_accessor_classes_get_id (const char *str, size_t len) { static const unsigned short asso_values[] = { @@ -687,8 +686,7 @@ static const struct accessor_class_hash classes[] = {"g1forecastmonth", &grib_accessor_class_g1forecastmonth} }; -static const struct accessor_class_hash * -grib_accessor_classes_hash (const char *str, size_t len) +static const struct accessor_class_hash* grib_accessor_classes_hash (const char *str, size_t len) { unsigned int key = grib_accessor_classes_get_id (str, len);