diff --git a/libnczarr/zfilter.c b/libnczarr/zfilter.c index a4ca1d358..58bb0984d 100644 --- a/libnczarr/zfilter.c +++ b/libnczarr/zfilter.c @@ -1508,7 +1508,8 @@ memset(plugin,0,sizeof(NCZ_Plugin)); static int pluginnamecheck(const char* name) { - size_t i,count,len; + size_t count,len; + long i; const char* p; if(name == NULL) return 0; /* get basename */ @@ -1516,7 +1517,7 @@ pluginnamecheck(const char* name) if(p != NULL) name = (p+1); len = strlen(name); if(len == 0) return 0; - i = len-1; + i = (long)(len-1); count = 1; p = name+i; for(;i>=0;i--,count++,p--) { diff --git a/ncdump/ncfilteravail.c b/ncdump/ncfilteravail.c index b7e937627..d8ee342f6 100644 --- a/ncdump/ncfilteravail.c +++ b/ncdump/ncfilteravail.c @@ -89,7 +89,7 @@ getformat(const char* sformat) static int -makeurl(struct Options* faoptions) +makeurl(struct Options* faopt) { int stat = NC_NOERR; int format; @@ -101,7 +101,7 @@ makeurl(struct Options* faoptions) #else pid = (int)getpid(); #endif - switch (format = getformat(faoptions->format)) { + switch (format = getformat(faopt->format)) { case NC_FORMATX_NC4: snprintf(url,sizeof(url),"tmp_%d.nc",pid); break; @@ -110,23 +110,23 @@ makeurl(struct Options* faoptions) break; default: stat = NC_EINVAL; break; } - if(stat == NC_NOERR) faoptions->url = strdup(url); + if(stat == NC_NOERR) faopt->url = strdup(url); return stat; } static int -makefilterid(struct Options* faoptions) +makefilterid(struct Options* faopt) { int stat = NC_NOERR; const struct Filter* f = NULL; for(f=known_filters;f->name;f++) { - if(strcmp(f->name,faoptions->filtername)==0) { - faoptions->filterid = f->id; + if(strcmp(f->name,faopt->filtername)==0) { + faopt->filterid = f->id; goto done; } } /* See if it is a number */ - if(1!=sscanf(faoptions->filtername,"%u",&faoptions->filterid)) + if(1!=sscanf(faopt->filtername,"%u",&faopt->filterid)) {stat = NC_EINVAL; goto done;} done: return stat; diff --git a/plugins/H5Zblosc.c b/plugins/H5Zblosc.c index b4fba83d0..06afc4c71 100755 --- a/plugins/H5Zblosc.c +++ b/plugins/H5Zblosc.c @@ -469,7 +469,7 @@ NCZ_blosc_modify_parameters(int ncid, int varid, size_t* vnparamsp, unsigned** v {stat = NC_EFILTER; goto done;} nparams = 7; - if(vnparams > 0 && vparams == NULL) + if(vparams == NULL) {stat = NC_EFILTER; goto done;} if(wnparamsp == NULL || wparamsp == NULL)