Corrected a couple of minor issues reported by static analysis.

This commit is contained in:
Ward Fisher 2015-07-10 15:09:14 -06:00
parent c7484cb4d4
commit 7bb61718bf
2 changed files with 83 additions and 82 deletions

View File

@ -120,7 +120,10 @@ NC_check_file_type(const char *path, int flags, void *parameters,
char magic[MAGIC_NUMBER_LEN];
int status = NC_NOERR;
int diskless = ((flags & NC_DISKLESS) == NC_DISKLESS);
int persist = ((flags & NC_WRITE) == NC_WRITE);
/* Unused, throws a 'value never read' in static analysis. */
//int persist = ((flags & NC_WRITE) == NC_WRITE);
int use_parallel = ((flags & NC_MPIIO) == NC_MPIIO);
int inmemory = (diskless && ((flags & NC_INMEMORY) == NC_INMEMORY));
@ -1891,5 +1894,3 @@ nc__pseudofd(void)
}
return pseudofd++;
}

View File

@ -125,7 +125,7 @@ static void
rctrim(char* text)
{
char* p = text;
size_t len = strlen(text);
size_t len;
int i;
/* locate first non-trimchar */
for(;*p;p++) {