Skip to content

Commit 3a14251

Browse files
authored
Merge branch 'master' into bigend.dmh
2 parents 8714066 + a260bbb commit 3a14251

24 files changed

Lines changed: 377 additions & 117 deletions

CMakeInstallation.cmake

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ SET(CPACK_SOURCE_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}"
3838
"/obsolete/"
3939
"/unknown/"
4040
".*~"
41+
".git/"
4142
)
4243

4344
###
@@ -56,9 +57,9 @@ IF(WIN32)
5657
SET(CPACK_NSIS_CONTACT "support-netcdf@unidata.ucar.edu")
5758
SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
5859
SET(CPACK_NSIS_MENU_LINKS
59-
"http://www.unidata.ucar.edu/netcdf" "Unidata Website"
60-
"http://www.unidata.ucar.edu/netcdf/docs" "NetCDF Stable Documentation"
61-
"http://www.unidata.ucar.edu/netcdf/docs_rc" "NetCDF Unstable Documentation")
60+
"http://www.unidata.ucar.edu/software/netcdf" "Unidata Website"
61+
"http://www.unidata.ucar.edu/software/netcdf/docs" "NetCDF Stable Documentation"
62+
"http://www.unidata.ucar.edu/software/netcdf/docs_rc" "NetCDF Unstable Documentation")
6263

6364
ENDIF()
6465

@@ -103,7 +104,7 @@ ENDIF()
103104

104105
IF(APPLE)
105106
SET(CPACK_SOURCE_GENERATOR "TGZ")
106-
SET(CPACK_GENERATOR "PackageMaker" "STGZ" "TBZ2" "TGZ" "ZIP")
107+
SET(CPACK_GENERATOR "productbuild" "STGZ" "TBZ2" "TGZ" "ZIP")
107108
ENDIF()
108109

109110
##

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ IF(MSVC)
8282
ENDIF()
8383

8484
#Add custom CMake Module
85-
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/"
85+
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/"
8686
CACHE INTERNAL "Location of our custom CMake modules.")
8787

8888
# auto-configure style checks, other CMake modules.

include/hdf5internal.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,14 @@ int nc4_reform_coord_var(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *coord_var, NC_DIM_IN
135135
extern hid_t NC4_image_init(NC_FILE_INFO_T* h5);
136136
extern void NC4_image_finalize(void*);
137137

138-
/* These functions are internal to the libhdf5 directory. */
138+
/* Create HDF5 dataset for dim without a coord var. */
139+
extern int nc4_create_dim_wo_var(NC_DIM_INFO_T *dim);
140+
141+
/* Give a var a secret HDF5 name, for use when there is a dim of this
142+
* name, but the var is not a coord var of that dim. */
143+
extern int nc4_give_var_secret_name(NC_VAR_INFO_T *var);
144+
145+
/* Get the fill value for a var. */
139146
int nc4_get_fill_value(NC_FILE_INFO_T *h5, NC_VAR_INFO_T *var, void **fillp);
140147

141148

include/nc4internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ typedef struct NC_VAR_INFO
153153
nc_bool_t created; /* Variable has already been created (_not_ that it was just created) */
154154
nc_bool_t written_to; /* True if variable has data written to it */
155155
struct NC_TYPE_INFO *type_info;
156-
int atts_not_read; /* If true, the atts have not yet been read. */
156+
int atts_read; /* If true, the atts have been read. */
157157
nc_bool_t meta_read; /* True if this vars metadata has been completely read. */
158158
nc_bool_t coords_read; /* True if this var has hidden coordinates att, and it has been read. */
159159
NCindex *att; /* NCindex<NC_ATT_INFO_T*> */
@@ -229,7 +229,7 @@ typedef struct NC_GRP_INFO
229229
void *format_grp_info;
230230
struct NC_FILE_INFO *nc4_info;
231231
struct NC_GRP_INFO *parent;
232-
int atts_not_read;
232+
int atts_read; /* True if atts have been read for this group. */
233233
NCindex* children; /* NCindex<struct NC_GRP_INFO*> */
234234
NCindex* dim; /* NCindex<NC_DIM_INFO_T> * */
235235
NCindex* att; /* NCindex<NC_ATT_INFO_T> * */

include/ncconfigure.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,8 @@ typedef unsigned short ushort;
8989
typedef unsigned int uint;
9090
#endif
9191

92+
#ifndef NC_UNUSED
93+
#define NC_UNUSED(var) (void)var
94+
#endif
95+
9296
#endif /* NCCONFIGURE_H */

libdispatch/dparallel.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ int nc_create_par(const char *path, int cmode, MPI_Comm comm,
102102
MPI_Info info, int *ncidp)
103103
{
104104
#ifndef USE_PARALLEL
105+
NC_UNUSED(path);
106+
NC_UNUSED(cmode);
107+
NC_UNUSED(comm);
108+
NC_UNUSED(info);
109+
NC_UNUSED(ncidp);
105110
return NC_ENOPAR;
106111
#else
107112
NC_MPI_INFO data;
@@ -201,6 +206,11 @@ nc_open_par(const char *path, int omode, MPI_Comm comm,
201206
MPI_Info info, int *ncidp)
202207
{
203208
#ifndef USE_PARALLEL
209+
NC_UNUSED(path);
210+
NC_UNUSED(omode);
211+
NC_UNUSED(comm);
212+
NC_UNUSED(info);
213+
NC_UNUSED(ncidp);
204214
return NC_ENOPAR;
205215
#else
206216
NC_MPI_INFO mpi_data;
@@ -249,6 +259,11 @@ nc_open_par_fortran(const char *path, int omode, int comm,
249259
int info, int *ncidp)
250260
{
251261
#ifndef USE_PARALLEL
262+
NC_UNUSED(path);
263+
NC_UNUSED(omode);
264+
NC_UNUSED(comm);
265+
NC_UNUSED(info);
266+
NC_UNUSED(ncidp);
252267
return NC_ENOPAR;
253268
#else
254269
MPI_Comm comm_c;
@@ -348,6 +363,9 @@ int
348363
nc_var_par_access(int ncid, int varid, int par_access)
349364
{
350365
#ifndef USE_PARALLEL
366+
NC_UNUSED(ncid);
367+
NC_UNUSED(varid);
368+
NC_UNUSED(par_access);
351369
return NC_ENOPAR;
352370
#else
353371
int stat = NC_NOERR;
@@ -403,6 +421,11 @@ nc_create_par_fortran(const char *path, int cmode, int comm,
403421
int info, int *ncidp)
404422
{
405423
#ifndef USE_PARALLEL
424+
NC_UNUSED(path);
425+
NC_UNUSED(cmode);
426+
NC_UNUSED(comm);
427+
NC_UNUSED(info);
428+
NC_UNUSED(ncidp);
406429
return NC_ENOPAR;
407430
#else
408431
MPI_Comm comm_c;

libdispatch/drc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ rcsearch(const char* prefix, const char* rcname, char** pathp)
396396
{
397397
char* path = NULL;
398398
FILE* f = NULL;
399-
int plen = strlen(prefix);
400-
int rclen = strlen(rcname);
399+
size_t plen = strlen(prefix);
400+
size_t rclen = strlen(rcname);
401401
int ret = NC_NOERR;
402402

403403
size_t pathlen = plen+rclen+1; /*+1 for '/' */

libdispatch/dutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ NC_mktmp(const char* base)
210210
char spid[7];
211211
if(rno < 0) rno = -rno;
212212
snprintf(spid,sizeof(spid),"%06d",rno);
213-
strncat(tmp,spid,sizeof(tmp));
213+
strncat(tmp,spid,sizeof(tmp) - strlen(tmp) - 1);
214214
}
215215
#endif /* HAVE_MKTEMP */
216216
#ifdef _MSC_VER

libdispatch/nclog.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ Each line will be sent using nclog with the specified tag.
213213
void
214214
nclogtextn(int tag, const char* text, size_t count)
215215
{
216+
NC_UNUSED(tag);
216217
if(!nclogging || nclogstream == NULL) return;
217218
fwrite(text,1,count,nclogstream);
218219
fflush(nclogstream);

libdispatch/nctime.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <string.h>
2424
#include <stdarg.h>
2525
#include <assert.h>
26+
#include "ncconfigure.h"
2627
#include "nctime.h"
2728

2829
static int cuErrOpts; /* Error options */
@@ -309,7 +310,7 @@ cdParseRelunits(cdCalenType timetype, char* relunits, cdUnitTime* unit, cdCompTi
309310
char charunits[CD_MAX_RELUNITS];
310311
char basetime_1[CD_MAX_CHARTIME];
311312
char basetime_2[CD_MAX_CHARTIME];
312-
char basetime[CD_MAX_CHARTIME];
313+
char basetime[2 * CD_MAX_CHARTIME + 1];
313314
int nconv1, nconv2, nconv;
314315

315316
/* Parse the relunits */
@@ -659,6 +660,7 @@ Cdh2e(CdTime *htime, double *etime)
659660
static int
660661
cdValidateTime(cdCalenType timetype, cdCompTime comptime)
661662
{
663+
NC_UNUSED(timetype);
662664
if(comptime.month<1 || comptime.month>12){
663665
cdError("Error on time conversion: invalid month = %hd\n",comptime.month);
664666
return 1;

0 commit comments

Comments
 (0)