Merge branch 'master' into ejh_more_rename_woes_3

This commit is contained in:
Ward Fisher 2019-02-07 14:28:46 -07:00 committed by GitHub
commit 4c6d56abc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 57 additions and 13 deletions

View File

@ -38,6 +38,7 @@ SET(CPACK_SOURCE_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}"
"/obsolete/"
"/unknown/"
".*~"
".git/"
)
###
@ -56,9 +57,9 @@ IF(WIN32)
SET(CPACK_NSIS_CONTACT "support-netcdf@unidata.ucar.edu")
SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
SET(CPACK_NSIS_MENU_LINKS
"http://www.unidata.ucar.edu/netcdf" "Unidata Website"
"http://www.unidata.ucar.edu/netcdf/docs" "NetCDF Stable Documentation"
"http://www.unidata.ucar.edu/netcdf/docs_rc" "NetCDF Unstable Documentation")
"http://www.unidata.ucar.edu/software/netcdf" "Unidata Website"
"http://www.unidata.ucar.edu/software/netcdf/docs" "NetCDF Stable Documentation"
"http://www.unidata.ucar.edu/software/netcdf/docs_rc" "NetCDF Unstable Documentation")
ENDIF()
@ -103,7 +104,7 @@ ENDIF()
IF(APPLE)
SET(CPACK_SOURCE_GENERATOR "TGZ")
SET(CPACK_GENERATOR "PackageMaker" "STGZ" "TBZ2" "TGZ" "ZIP")
SET(CPACK_GENERATOR "productbuild" "STGZ" "TBZ2" "TGZ" "ZIP")
ENDIF()
##

View File

@ -82,7 +82,7 @@ IF(MSVC)
ENDIF()
#Add custom CMake Module
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/"
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/"
CACHE INTERNAL "Location of our custom CMake modules.")
# auto-configure style checks, other CMake modules.

View File

@ -89,4 +89,8 @@ typedef unsigned short ushort;
typedef unsigned int uint;
#endif
#ifndef NC_UNUSED
#define NC_UNUSED(var) (void)var
#endif
#endif /* NCCONFIGURE_H */

View File

@ -102,6 +102,11 @@ int nc_create_par(const char *path, int cmode, MPI_Comm comm,
MPI_Info info, int *ncidp)
{
#ifndef USE_PARALLEL
NC_UNUSED(path);
NC_UNUSED(cmode);
NC_UNUSED(comm);
NC_UNUSED(info);
NC_UNUSED(ncidp);
return NC_ENOPAR;
#else
NC_MPI_INFO data;
@ -201,6 +206,11 @@ nc_open_par(const char *path, int omode, MPI_Comm comm,
MPI_Info info, int *ncidp)
{
#ifndef USE_PARALLEL
NC_UNUSED(path);
NC_UNUSED(omode);
NC_UNUSED(comm);
NC_UNUSED(info);
NC_UNUSED(ncidp);
return NC_ENOPAR;
#else
NC_MPI_INFO mpi_data;
@ -249,6 +259,11 @@ nc_open_par_fortran(const char *path, int omode, int comm,
int info, int *ncidp)
{
#ifndef USE_PARALLEL
NC_UNUSED(path);
NC_UNUSED(omode);
NC_UNUSED(comm);
NC_UNUSED(info);
NC_UNUSED(ncidp);
return NC_ENOPAR;
#else
MPI_Comm comm_c;
@ -348,6 +363,9 @@ int
nc_var_par_access(int ncid, int varid, int par_access)
{
#ifndef USE_PARALLEL
NC_UNUSED(ncid);
NC_UNUSED(varid);
NC_UNUSED(par_access);
return NC_ENOPAR;
#else
int stat = NC_NOERR;
@ -403,6 +421,11 @@ nc_create_par_fortran(const char *path, int cmode, int comm,
int info, int *ncidp)
{
#ifndef USE_PARALLEL
NC_UNUSED(path);
NC_UNUSED(cmode);
NC_UNUSED(comm);
NC_UNUSED(info);
NC_UNUSED(ncidp);
return NC_ENOPAR;
#else
MPI_Comm comm_c;

View File

@ -396,8 +396,8 @@ rcsearch(const char* prefix, const char* rcname, char** pathp)
{
char* path = NULL;
FILE* f = NULL;
int plen = strlen(prefix);
int rclen = strlen(rcname);
size_t plen = strlen(prefix);
size_t rclen = strlen(rcname);
int ret = NC_NOERR;
size_t pathlen = plen+rclen+1; /*+1 for '/' */

View File

@ -210,7 +210,7 @@ NC_mktmp(const char* base)
char spid[7];
if(rno < 0) rno = -rno;
snprintf(spid,sizeof(spid),"%06d",rno);
strncat(tmp,spid,sizeof(tmp));
strncat(tmp,spid,sizeof(tmp) - strlen(tmp) - 1);
}
#endif /* HAVE_MKTEMP */
#ifdef _MSC_VER

View File

@ -213,6 +213,7 @@ Each line will be sent using nclog with the specified tag.
void
nclogtextn(int tag, const char* text, size_t count)
{
NC_UNUSED(tag);
if(!nclogging || nclogstream == NULL) return;
fwrite(text,1,count,nclogstream);
fflush(nclogstream);

View File

@ -23,6 +23,7 @@
#include <string.h>
#include <stdarg.h>
#include <assert.h>
#include "ncconfigure.h"
#include "nctime.h"
static int cuErrOpts; /* Error options */
@ -309,7 +310,7 @@ cdParseRelunits(cdCalenType timetype, char* relunits, cdUnitTime* unit, cdCompTi
char charunits[CD_MAX_RELUNITS];
char basetime_1[CD_MAX_CHARTIME];
char basetime_2[CD_MAX_CHARTIME];
char basetime[CD_MAX_CHARTIME];
char basetime[2 * CD_MAX_CHARTIME + 1];
int nconv1, nconv2, nconv;
/* Parse the relunits */
@ -659,6 +660,7 @@ Cdh2e(CdTime *htime, double *etime)
static int
cdValidateTime(cdCalenType timetype, cdCompTime comptime)
{
NC_UNUSED(timetype);
if(comptime.month<1 || comptime.month>12){
cdError("Error on time conversion: invalid month = %hd\n",comptime.month);
return 1;

View File

@ -67,7 +67,7 @@ static char* queryallow =
static char* userpwdallow =
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!$&'()*+,-.;=_~?#/";
#ifndef HAVE_STRNCMP
#ifndef HAVE_STRNDUP
#define strndup ncstrndup
/* Not all systems have strndup, so provide one*/
char*
@ -258,7 +258,7 @@ ncuriparse(const char* uri0, NCURI** durip)
isfile = (strcmp(tmp.protocol,"file")==0);
if(isfile) {
int l = strlen(p); /* to test if we have enough characters */
size_t l = strlen(p); /* to test if we have enough characters */
hashost = 0; /* always */
if(l >= 2 && p[1] == ':' && strchr(DRIVELETTERS,p[0]) != NULL) { /* case 1 */
; /* p points to the start of the path */

View File

@ -184,7 +184,11 @@ blksize(int fd)
return 8192;
}
/* else, silent in the face of error */
#else
NC_UNUSED(fd);
#endif
#else
NC_UNUSED(fd);
#endif
return (size_t) 2 * pagesize();
}
@ -445,6 +449,7 @@ px_rel(ncio_px *const pxp, off_t offset, int rflags)
&& offset < pxp->bf_offset + (off_t) pxp->bf_extent);
assert(pIf(fIsSet(rflags, RGN_MODIFIED),
fIsSet(pxp->bf_rflags, RGN_WRITE)));
NC_UNUSED(offset);
if(fIsSet(rflags, RGN_MODIFIED))
{
@ -797,6 +802,7 @@ px_double_buffer(ncio *const nciop, off_t to, off_t from,
int status = NC_NOERR;
void *src;
void *dest;
NC_UNUSED(rflags);
#if INSTRUMENT
fprintf(stderr, "\tdouble_buffr %ld %ld %ld\n",
@ -1152,6 +1158,7 @@ ncio_spx_rel(ncio *const nciop, off_t offset, int rflags)
assert(offset < pxp->bf_offset + X_ALIGN);
assert(pxp->bf_cnt % X_ALIGN == 0 );
#endif
NC_UNUSED(offset);
if(fIsSet(rflags, RGN_MODIFIED))
{
@ -1400,6 +1407,7 @@ ncio_spx_move(ncio *const nciop, off_t to, off_t from,
static int
ncio_spx_sync(ncio *const nciop)
{
NC_UNUSED(nciop);
/* NOOP */
return NC_NOERR;
}
@ -1592,6 +1600,7 @@ posixio_create(const char *path, int ioflags,
int oflags = (O_RDWR|O_CREAT);
int fd;
int status;
NC_UNUSED(parameters);
if(initialsz < (size_t)igeto + igetsz)
initialsz = (size_t)igeto + igetsz;
@ -1736,6 +1745,7 @@ posixio_open(const char *path,
int oflags = fIsSet(ioflags, NC_WRITE) ? O_RDWR : O_RDONLY;
int fd = -1;
int status = 0;
NC_UNUSED(parameters);
if(path == NULL || *path == 0)
return EINVAL;

View File

@ -390,6 +390,9 @@ int
NC4_var_par_access(int ncid, int varid, int par_access)
{
#ifndef USE_PARALLEL4
NC_UNUSED(ncid);
NC_UNUSED(varid);
NC_UNUSED(par_access);
return NC_ENOPAR;
#else
NC *nc;

View File

@ -144,10 +144,10 @@ tst_floats2_*.cdl tst_ints2_*.cdl tst_shorts2_*.cdl tst_elena_*.cdl \
tst_simple*.cdl tst_chunks.cdl pr_A1.* tauu_A1.* usi_01.* thetau_01.* \
tst_*.h5 tst_grp_rename.cdl tst_grp_rename.dmp ref_grp_rename.cdl \
foo1.nc tst_*.h4 test.nc testszip.nc test.h5 szip_dump.cdl \
perftest.txt bigmeta.nc bigvars.nc run_par_test.sh *.gz MSGCPP_*.nc \
perftest.txt bigmeta.nc bigvars.nc *.gz MSGCPP_*.nc \
floats*.nc floats*.cdl shorts*.nc shorts*.cdl ints*.nc ints*.cdl
DISTCLEANFILES = findplugin.sh
DISTCLEANFILES = findplugin.sh run_par_test.sh
# If valgrind is present, add valgrind targets.
@VALGRIND_CHECK_RULES@