SUP-3892: Eccodes 2.32 onwards compile with Intel problems

This commit is contained in:
Shahram Najm 2023-12-19 15:00:14 +00:00
parent 2666565b7f
commit ba8df5afa6
1 changed files with 5 additions and 5 deletions

View File

@ -751,11 +751,6 @@ static int pack_string(grib_accessor* a, const char* buffer, size_t* len)
grib_codetable* table = NULL; grib_codetable* table = NULL;
long i = 0; long i = 0;
size_t size = 1; size_t size = 1;
bool case_sensitive = true;
// If the key has the "lowercase" flag set, then the string comparison
// should ignore the case
if (a->flags & GRIB_ACCESSOR_FLAG_LOWERCASE) case_sensitive = false;
if (!self->table_loaded) { if (!self->table_loaded) {
self->table = load_table(a); /* may return NULL */ self->table = load_table(a); /* may return NULL */
@ -772,6 +767,11 @@ static int pack_string(grib_accessor* a, const char* buffer, size_t* len)
return err; return err;
} }
// If the key has the "lowercase" flag set, then the string comparison
// should ignore the case
bool case_sensitive = true;
if (a->flags & GRIB_ACCESSOR_FLAG_LOWERCASE) case_sensitive = false;
for (i = 0; i < table->size; i++) { for (i = 0; i < table->size; i++) {
if (table->entries[i].abbreviation) { if (table->entries[i].abbreviation) {
if (strings_equal(table->entries[i].abbreviation, buffer, case_sensitive)) { if (strings_equal(table->entries[i].abbreviation, buffer, case_sensitive)) {