mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
1) fix some minor bugs when pnetcdf is enabled 2)Comment out some apparently unused procedures
This commit is contained in:
parent
8d993d58d8
commit
4e41843740
@ -245,7 +245,7 @@ dcemergeprojections(DCEprojection* merged, DCEprojection* addition)
|
||||
that can be used with the url
|
||||
*/
|
||||
|
||||
static char*
|
||||
char*
|
||||
buildprojectionstring(NClist* projections)
|
||||
{
|
||||
char* pstring;
|
||||
@ -256,7 +256,7 @@ buildprojectionstring(NClist* projections)
|
||||
return pstring;
|
||||
}
|
||||
|
||||
static char*
|
||||
char*
|
||||
buildselectionstring(NClist* selections)
|
||||
{
|
||||
NCbytes* buf = ncbytesnew();
|
||||
@ -267,7 +267,7 @@ buildselectionstring(NClist* selections)
|
||||
return sstring;
|
||||
}
|
||||
|
||||
static char*
|
||||
char*
|
||||
buildconstraintstring(DCEconstraint* constraints)
|
||||
{
|
||||
NCbytes* buf = ncbytesnew();
|
||||
|
@ -136,6 +136,14 @@ extern size_t dcesafeindex(DCEsegment* seg, size_t start, size_t stop);
|
||||
/* Compute segment size for start upto stop */
|
||||
extern size_t dcesegmentsize(DCEsegment*, size_t start, size_t stop);
|
||||
|
||||
/* Convert a DCE projection/selection/constraint instance into a string
|
||||
that can be used with a url. Caller must free returned string.
|
||||
*/
|
||||
|
||||
extern char* buildprojectionstring(NClist* projections);
|
||||
extern char* buildselectionstring(NClist* selections);
|
||||
extern char* buildconstraintstring(DCEconstraint* constraints);
|
||||
|
||||
extern int dceverbose;
|
||||
|
||||
#endif /*DCECONSTRAINTS_H*/
|
||||
|
@ -695,7 +695,8 @@ findfield(CDFnode* node, CDFnode* field)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
#ifdef EXTERN_UNUSED
|
||||
int
|
||||
nc3d_getvarmx(int ncid, int varid,
|
||||
const size_t *start,
|
||||
const size_t *edges,
|
||||
@ -879,6 +880,7 @@ fprintf(stderr,"old: %lu -> %lu %f\n",
|
||||
done:
|
||||
return ncstat;
|
||||
}
|
||||
#endif /*EXTERN_UNUSED*/
|
||||
|
||||
static int
|
||||
conversionrequired(nc_type t1, nc_type t2)
|
||||
|
@ -668,7 +668,8 @@ nc4_dim_list_add(NC_DIM_INFO_T **list)
|
||||
}
|
||||
|
||||
/* Add to the beginning of a dim list. */
|
||||
static int
|
||||
#ifdef EXTERN_UNUSED
|
||||
int
|
||||
nc4_dim_list_add2(NC_DIM_INFO_T **list, NC_DIM_INFO_T **new_dim)
|
||||
{
|
||||
NC_DIM_INFO_T *dim;
|
||||
@ -684,6 +685,7 @@ nc4_dim_list_add2(NC_DIM_INFO_T **list, NC_DIM_INFO_T **new_dim)
|
||||
*new_dim = dim;
|
||||
return NC_NOERR;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Add to the end of an att list. */
|
||||
int
|
||||
|
@ -120,8 +120,6 @@ tst_att_ordering(int cmode)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
(void) signal(SIGFPE, SIG_IGN);
|
||||
|
||||
signed char schar_in[ATT_LEN], schar_out[ATT_LEN] = {NC_MIN_BYTE, 1, NC_MAX_BYTE};
|
||||
unsigned char uchar_in[ATT_LEN];
|
||||
short short_in[ATT_LEN], short_out[ATT_LEN] = {NC_MIN_SHORT, -128, NC_MAX_SHORT};
|
||||
@ -136,6 +134,8 @@ main(int argc, char **argv)
|
||||
unsigned long long ulonglong_in[ATT_LEN] = {NC_MAX_UINT64, NC_MAX_UINT64, NC_MAX_UINT64};
|
||||
unsigned long long ulonglong_out[ATT_LEN] = {0LL, 128LL, 3123456789LL};
|
||||
|
||||
(void) signal(SIGFPE, SIG_IGN);
|
||||
|
||||
printf("\n*** Testing netcdf-3 attribute functions.\n");
|
||||
printf("*** testing really simple global atts...");
|
||||
#define NUM_SIMPLE_ATTS 9
|
||||
|
4
oc2/oc.c
4
oc2/oc.c
@ -963,14 +963,10 @@ OCerror
|
||||
oc_data_fieldbyname(OCobject link, OCobject datanode, const char* name, OCobject* fieldp)
|
||||
{
|
||||
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);
|
||||
|
||||
/* Get the dds node for this datanode */
|
||||
err = oc_data_ddsnode(link,datanode,&ddsnode);
|
||||
|
12
oc2/ocutil.c
12
oc2/ocutil.c
@ -46,7 +46,8 @@ ocstrncmp(const char* s1, const char* s2, size_t len)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
#ifdef EXTERN_UNUSEd
|
||||
void
|
||||
makedimlist(OClist* path, OClist* dims)
|
||||
{
|
||||
unsigned int i,j;
|
||||
@ -59,6 +60,7 @@ makedimlist(OClist* path, OClist* dims)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
ocfreeprojectionclause(OCprojectionclause* clause)
|
||||
@ -76,7 +78,8 @@ ocfreeprojectionclause(OCprojectionclause* clause)
|
||||
free(clause);
|
||||
}
|
||||
|
||||
static void
|
||||
#ifdef EXTERN_UNUSED
|
||||
void
|
||||
freeAttributes(OClist* attset)
|
||||
{
|
||||
unsigned int i,j;
|
||||
@ -93,8 +96,10 @@ freeAttributes(OClist* attset)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
#ifdef EXTERN_UNUSED
|
||||
void
|
||||
freeOCnode(OCnode* cdf, int deep)
|
||||
{
|
||||
unsigned int i;
|
||||
@ -113,6 +118,7 @@ freeOCnode(OCnode* cdf, int deep)
|
||||
}
|
||||
free(cdf);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
ocfindbod(OCbytes* buffer, size_t* bodp, size_t* ddslenp)
|
||||
|
Loading…
Reference in New Issue
Block a user