Dead code removal

This commit is contained in:
Shahram Najm 2023-08-24 11:34:46 +01:00
parent 917d59531c
commit 15eeed49f1
2 changed files with 16 additions and 20 deletions

View File

@ -1158,7 +1158,6 @@ int grib_set_string(grib_handle* h, const char* name, const char* val, size_t* l
int grib_set_string_array(grib_handle* h, const char* name, const char** val, size_t length);
int grib_set_bytes_internal(grib_handle* h, const char* name, const unsigned char* val, size_t* length);
int grib_set_bytes(grib_handle* h, const char* name, const unsigned char* val, size_t* length);
int grib_clear(grib_handle* h, const char* name);
int grib_set_missing(grib_handle* h, const char* name);
int grib_is_missing_long(grib_accessor* a, long x);
int grib_is_missing_double(grib_accessor* a, double x);

View File

@ -537,25 +537,22 @@ int grib_set_bytes(grib_handle* h, const char* name, const unsigned char* val, s
return GRIB_NOT_FOUND;
}
int grib_clear(grib_handle* h, const char* name)
{
int ret = 0;
grib_accessor* a = NULL;
a = grib_find_accessor(h, name);
if (a) {
if (a->length == 0)
return 0;
if ((ret = grib_pack_zero(a)) != GRIB_SUCCESS)
grib_context_log(h->context, GRIB_LOG_ERROR, "unable to clear %s (%s)",
name, grib_get_error_message(ret));
return ret;
}
/*grib_context_log(h->context,GRIB_LOG_ERROR,"unable to find accessor %s",name);*/
return GRIB_NOT_FOUND;
}
// int grib_clear(grib_handle* h, const char* name)
// {
// int ret = 0;
// grib_accessor* a = NULL;
// a = grib_find_accessor(h, name);
// if (a) {
// if (a->length == 0)
// return 0;
// if ((ret = grib_pack_zero(a)) != GRIB_SUCCESS)
// grib_context_log(h->context, GRIB_LOG_ERROR, "unable to clear %s (%s)",
// name, grib_get_error_message(ret));
// return ret;
// }
// /*grib_context_log(h->context,GRIB_LOG_ERROR,"unable to find accessor %s",name);*/
// return GRIB_NOT_FOUND;
// }
int grib_set_missing(grib_handle* h, const char* name)
{