Corrected 2 windows-specific errors when using Visual Studio:

1. In nc4hdf.c, had a variable declaration located such
that Visual Studio complained and threw an error. Moved
to head of function.

2. Visual Studio was complaining about variable declarations
being made after OCVERIFY/OCDEREF macros.
This commit is contained in:
Ward Fisher 2013-01-29 23:33:59 +00:00
parent 460ac331e0
commit 71a30406f7
2 changed files with 5 additions and 4 deletions

View File

@ -172,6 +172,7 @@ nc4_pg_var1(NC_PG_T pg, NC *nc, int ncid, int varid,
int i;
size_t *start = NULL;
size_t *count = NULL;
int res = 0;
int retval;
@ -199,7 +200,6 @@ nc4_pg_var1(NC_PG_T pg, NC *nc, int ncid, int varid,
}
/* Get or put this data. */
int res = 0;
if (pg == GET) {
res = nc4_get_vara(nc, ncid, varid, start, count, xtype,
is_long, ip);

View File

@ -551,9 +551,10 @@ oc_dds_fieldbyname(OCobject link, OCobject ddsnode, const char* name, OCobject*
{
OCerror err = OC_NOERR;
OCnode* node;
size_t count,i;
OCVERIFY(OC_Node,ddsnode);
OCDEREF(OCnode*,node,ddsnode);
size_t count,i;
if(!iscontainer(node->octype))
return OC_EBADTYPE;
@ -965,12 +966,12 @@ oc_data_fieldbyname(OCobject link, OCobject datanode, const char* name, OCobject
OCerror err = OC_NOERR;
OCstate* state;
OCdata* data;
size_t count,i;
OCobject ddsnode;
OCVERIFY(OC_State,link);
OCDEREF(OCstate*,state,link);
OCVERIFY(OC_Data,datanode);
OCDEREF(OCdata*,data,datanode);
size_t count,i;
OCobject ddsnode;
/* Get the dds node for this datanode */
err = oc_data_ddsnode(link,datanode,&ddsnode);