Clang static analyser: Uninitialized argument value

This commit is contained in:
Shahram Najm 2020-02-10 18:03:14 +00:00
parent d0ac1e6cdc
commit 0262cbca61
1 changed files with 1 additions and 1 deletions

View File

@ -383,7 +383,7 @@ static int grib_concept_apply(grib_accessor* a, const char* name)
for (i = 0; i < concept_count; ++i) {
if (all_concept_vals[i]) {
int print_it = 1;
if (i > 0 && strcmp(all_concept_vals[i], all_concept_vals[i - 1]) == 0) {
if (i > 0 && all_concept_vals[i - 1] && strcmp(all_concept_vals[i], all_concept_vals[i - 1]) == 0) {
print_it = 0; /* skip duplicate entries */
}
if (print_it)