[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 941215: ncvarid don't give error message.



>Keywords: 199412151547.AA12407 netCDF ncvarid

Hi Bernward,

> I found a little bug in ncvarid:
> 
> If the netCDF file only contains global attributes, but no variables,
> ncvarid don't give an error message. The return status -1 is correct.
> 
> This is caused by the following code in var.c (function ncvarid):
> 
>       if(handle->vars == NULL)
>               return(-1) ;
>       
> 
> If a program checks the return code, this doesn't matter, but if a
> program uses ncopts=NC_FATAL;, it will not be aborted.

Thanks for reporting this.  We'll fix it in the next release.

--
Russ Rew                                                UCAR Unidata Program
address@hidden                                          P.O. Box 3000
http://www.unidata.ucar.edu/                          Boulder, CO 80307-3000