mirror of https://github.com/ecmwf/eccodes.git
Cleanup
This commit is contained in:
parent
4f446ffc61
commit
db30325fbf
|
@ -10,7 +10,6 @@
|
|||
|
||||
/***************************************************************************
|
||||
* Jean Baptiste Filippi - 01.11.2005 *
|
||||
* Enrico Fucile *
|
||||
***************************************************************************/
|
||||
#include "grib_api_internal.h"
|
||||
/*
|
||||
|
@ -107,7 +106,7 @@ static int create_accessor(grib_section* p, grib_action* act, grib_loader* h)
|
|||
long val = 0;
|
||||
|
||||
if ((ret = grib_expression_evaluate_long(p->h, a->expression, &val)) != GRIB_SUCCESS) {
|
||||
grib_context_log(p->h->context, GRIB_LOG_DEBUG, "List %s creating %d values unable to evaluate long", act->name, val);
|
||||
grib_context_log(p->h->context, GRIB_LOG_DEBUG, "List %s creating %ld values: Unable to evaluate long", act->name, val);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -166,7 +165,7 @@ static grib_action* reparse(grib_action* a, grib_accessor* acc, int* doit)
|
|||
|
||||
if ((ret = grib_expression_evaluate_long(grib_handle_of_accessor(acc), self->expression, &val)) != GRIB_SUCCESS) {
|
||||
grib_context_log(acc->context, GRIB_LOG_ERROR,
|
||||
"List %s creating %ld values, unable to evaluate long", acc->name, val);
|
||||
"List %s creating %ld values: Unable to evaluate long", acc->name, val);
|
||||
}
|
||||
|
||||
*doit = (val != acc->loop);
|
||||
|
|
|
@ -107,7 +107,7 @@ grib_accessor_class* grib_accessor_class_section_pointer = &_grib_accessor_class
|
|||
|
||||
static void init(grib_accessor* a, const long len, grib_arguments* arg)
|
||||
{
|
||||
int n = 0;
|
||||
int n = 0;
|
||||
grib_accessor_section_pointer* self = (grib_accessor_section_pointer*)a;
|
||||
|
||||
self->sectionOffset = grib_arguments_get_name(grib_handle_of_accessor(a), arg, n++);
|
||||
|
@ -162,13 +162,13 @@ static int unpack_string(grib_accessor* a, char* v, size_t* len)
|
|||
static long byte_count(grib_accessor* a)
|
||||
{
|
||||
grib_accessor_section_pointer* self = (grib_accessor_section_pointer*)a;
|
||||
long sectionLength = 0;
|
||||
int ret = 0;
|
||||
long sectionLength = 0;
|
||||
int ret = 0;
|
||||
|
||||
ret = grib_get_long(grib_handle_of_accessor(a), self->sectionLength, §ionLength);
|
||||
if (ret) {
|
||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||
"unable to get %s %s",
|
||||
"Unable to get %s %s",
|
||||
self->sectionLength, grib_get_error_message(ret));
|
||||
return -1;
|
||||
}
|
||||
|
@ -179,13 +179,13 @@ static long byte_count(grib_accessor* a)
|
|||
static long byte_offset(grib_accessor* a)
|
||||
{
|
||||
grib_accessor_section_pointer* self = (grib_accessor_section_pointer*)a;
|
||||
long sectionOffset = 0;
|
||||
int ret = 0;
|
||||
long sectionOffset = 0;
|
||||
int ret = 0;
|
||||
|
||||
ret = grib_get_long(grib_handle_of_accessor(a), self->sectionOffset, §ionOffset);
|
||||
if (ret) {
|
||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||
"unable to get %s %s",
|
||||
"Unable to get %s %s",
|
||||
self->sectionOffset, grib_get_error_message(ret));
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -543,7 +543,7 @@ grib_index* grib_index_new(grib_context* c, const char* key, int* err)
|
|||
|
||||
index = (grib_index*)grib_context_malloc_clear(c, sizeof(grib_index));
|
||||
if (!index) {
|
||||
grib_context_log(c, GRIB_LOG_ERROR, "unable to create index");
|
||||
grib_context_log(c, GRIB_LOG_ERROR, "Unable to create index");
|
||||
*err = GRIB_OUT_OF_MEMORY;
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1033,7 +1033,7 @@ int grib_index_search_same(grib_index* index, grib_handle* h)
|
|||
}
|
||||
if (err && err != GRIB_NOT_FOUND) {
|
||||
grib_context_log(c, GRIB_LOG_ERROR,
|
||||
"unable to create index. \"%s\": %s",
|
||||
"Unable to create index. \"%s\": %s",
|
||||
keys->name, grib_get_error_message(err));
|
||||
return err;
|
||||
}
|
||||
|
@ -1138,7 +1138,7 @@ static int codes_index_add_file_internal(grib_index* index, const char* filename
|
|||
if (!error && set_values_count != 0) {
|
||||
err = grib_set_values(h, set_values, set_values_count);
|
||||
if (err) {
|
||||
grib_context_log(c, GRIB_LOG_ERROR,"codes_index_add_file: unable to set %s\n", envsetkeys);
|
||||
grib_context_log(c, GRIB_LOG_ERROR,"codes_index_add_file: Unable to set %s\n", envsetkeys);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
@ -1148,7 +1148,7 @@ static int codes_index_add_file_internal(grib_index* index, const char* filename
|
|||
if (index->product_kind == PRODUCT_BUFR && index->unpack_bufr) {
|
||||
err = grib_set_long(h, "unpack", 1);
|
||||
if (err) {
|
||||
grib_context_log(c, GRIB_LOG_ERROR, "unable to unpack BUFR to create index. \"%s\": %s",
|
||||
grib_context_log(c, GRIB_LOG_ERROR, "Unable to unpack BUFR to create index. \"%s\": %s",
|
||||
index_key->name, grib_get_error_message(err));
|
||||
return err;
|
||||
}
|
||||
|
@ -1186,7 +1186,7 @@ static int codes_index_add_file_internal(grib_index* index, const char* filename
|
|||
return err;
|
||||
}
|
||||
if (err && err != GRIB_NOT_FOUND) {
|
||||
grib_context_log(c, GRIB_LOG_ERROR, "unable to create index. key=\"%s\" (message #%lu): %s",
|
||||
grib_context_log(c, GRIB_LOG_ERROR, "Unable to create index. key=\"%s\" (message #%lu): %s",
|
||||
index_key->name, message_count, grib_get_error_message(err));
|
||||
return err;
|
||||
}
|
||||
|
@ -1359,7 +1359,7 @@ static int codes_index_add_file_internal(grib_index* index, const char* filename
|
|||
// return err;
|
||||
// }
|
||||
// if (err && err != GRIB_NOT_FOUND) {
|
||||
// grib_context_log(c,GRIB_LOG_ERROR,"unable to create index. \"%s\": %s",index_key->name,grib_get_error_message(err));
|
||||
// grib_context_log(c,GRIB_LOG_ERROR,"Unable to create index. \"%s\": %s",index_key->name,grib_get_error_message(err));
|
||||
// return err;
|
||||
// }
|
||||
|
||||
|
@ -1495,7 +1495,7 @@ int grib_index_get_long(const grib_index* index, const char* key, long* values,
|
|||
if (!k)
|
||||
return GRIB_NOT_FOUND;
|
||||
if (k->type != GRIB_TYPE_LONG) {
|
||||
grib_context_log(index->context, GRIB_LOG_ERROR, "unable to get index %s as long", key);
|
||||
grib_context_log(index->context, GRIB_LOG_ERROR, "Unable to get index %s as long", key);
|
||||
return GRIB_WRONG_TYPE;
|
||||
}
|
||||
if (k->values_count > *size)
|
||||
|
@ -1524,7 +1524,7 @@ int grib_index_get_double(const grib_index* index, const char* key, double* valu
|
|||
if (!k)
|
||||
return GRIB_NOT_FOUND;
|
||||
if (k->type != GRIB_TYPE_DOUBLE) {
|
||||
grib_context_log(index->context, GRIB_LOG_ERROR, "unable to get index %s as double", key);
|
||||
grib_context_log(index->context, GRIB_LOG_ERROR, "Unable to get index %s as double", key);
|
||||
return GRIB_WRONG_TYPE;
|
||||
}
|
||||
if (k->values_count > *size)
|
||||
|
|
|
@ -210,7 +210,7 @@ static int find_global(grib_nearest* nearest, grib_handle* h,
|
|||
|
||||
iter = grib_iterator_new(h, GRIB_GEOITERATOR_NO_VALUES, &ret);
|
||||
if (ret) {
|
||||
grib_context_log(h->context, GRIB_LOG_ERROR, "unable to create iterator");
|
||||
grib_context_log(h->context, GRIB_LOG_ERROR, "Unable to create iterator");
|
||||
return ret;
|
||||
}
|
||||
while (grib_iterator_next(iter, &lat, &lon, NULL)) {
|
||||
|
|
Loading…
Reference in New Issue