Skip to content

Commit

Permalink
fix initialization of var rec_var
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Jul 24, 2020
1 parent 2bd7f60 commit f6ad7c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/clib/pioc_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -2412,8 +2412,10 @@ inq_file_metadata(file_desc_t *file, int ncid, int iotype, int *nvars,
/* Only first dim may be unlimited, for PIO. */
if (unlim_found)
{
if (d == 0)
if (d == 0){
(*rec_var)[v] = 1;
break;
}
else
return pio_err(NULL, file, PIO_EINVAL, __FILE__, __LINE__);

Expand All @@ -2422,7 +2424,9 @@ inq_file_metadata(file_desc_t *file, int ncid, int iotype, int *nvars,
(*rec_var)[v] = 0;

}
PLOG((2,"varid %d var_ndims %d nunlimdims %d rec_var %d unlimdimids[0]=%d var_dimids[0]=%d\n",v,var_ndims, nunlimdims, (*rec_var)[v], unlimdimids[0], var_dimids[0]));
}

} /* next var */

/* Free resources. */
Expand Down

0 comments on commit f6ad7c5

Please sign in to comment.