diff --git a/src/grib_accessor_classes_hash.c b/src/grib_accessor_classes_hash.c index 9b275ff8b..aa46c1dfd 100644 --- a/src/grib_accessor_classes_hash.c +++ b/src/grib_accessor_classes_hash.c @@ -706,9 +706,10 @@ grib_accessor_classes_hash (const char *str, unsigned int len) #ifdef DEBUG { + const char *s; Assert( len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH ); Assert( key <= MAX_HASH_VALUE && key >= 0 ); - const char *s = classes[key].name; + s = classes[key].name; Assert( *str == *s && strcmp(str + 1, s + 1)==0 ); } #endif