mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-24 16:04:40 +08:00
Merge pull request #2307 from edwardhartnett/ejh_warn
fixed all code warnings
This commit is contained in:
commit
885e2cc4ae
@ -211,10 +211,11 @@ NC_mktmp(const char* base)
|
||||
int fd = -1;
|
||||
char* tmp = NULL;
|
||||
size_t len;
|
||||
int tries;
|
||||
#define MAXTRIES 4
|
||||
#ifdef HAVE_MKSTEMP
|
||||
mode_t mask;
|
||||
#else
|
||||
int tries;
|
||||
#endif
|
||||
|
||||
len = strlen(base)+6+1;
|
||||
|
@ -49,7 +49,9 @@ extern int ffio_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** co
|
||||
extern int memio_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** const);
|
||||
|
||||
/* Forward */
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
static int urlmodetest(const char* path);
|
||||
#endif
|
||||
|
||||
int
|
||||
ncio_create(const char *path, int ioflags, size_t initialsz,
|
||||
@ -179,6 +181,7 @@ NC_HTTP => byterange
|
||||
NC_S3SDK => s3
|
||||
0 => Not URL
|
||||
*/
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
static int
|
||||
urlmodetest(const char* path)
|
||||
{
|
||||
@ -195,3 +198,4 @@ urlmodetest(const char* path)
|
||||
ncurifree(uri);
|
||||
return kind;
|
||||
}
|
||||
#endif
|
||||
|
@ -132,7 +132,6 @@ fail(int ret)
|
||||
void
|
||||
exists(const char* file)
|
||||
{
|
||||
int stat = 0;
|
||||
FILE* f = NCfopen(file, "r");
|
||||
if(f == NULL) fail(NC_EPERM);
|
||||
fclose(f);
|
||||
|
@ -550,7 +550,7 @@ main(int argc, char **argv)
|
||||
/* union FU fout; */
|
||||
union FU xpect[DIM_LEN_5];
|
||||
union DU dfin;
|
||||
union DU dfout;
|
||||
/* union DU dfout; */
|
||||
union DU double_xpect[DIM_LEN_5];
|
||||
xpect[0].u = 0x3f8e3000;
|
||||
xpect[1].u = 0x3f800fff;
|
||||
|
@ -108,7 +108,9 @@ static Test PATHTESTS[] = {
|
||||
char* macros[128];
|
||||
|
||||
/*Forward */
|
||||
#ifdef DEBUG
|
||||
static const char* kind2string(int kind);
|
||||
#endif
|
||||
static char* expand(const char* s);
|
||||
static void setmacros(void);
|
||||
static void reclaimmacros(void);
|
||||
@ -130,7 +132,9 @@ main(int argc, char** argv)
|
||||
|
||||
/* Test localkind X path-kind */
|
||||
for(test=PATHTESTS;test->test;test++) {
|
||||
#ifdef DEBUG
|
||||
int inputkind = NCgetinputpathkind(test->test);
|
||||
#endif
|
||||
/* Iterate over the test paths */
|
||||
for(k=0;k<NKINDS;k++) {
|
||||
int kind = kinds[k];
|
||||
@ -188,6 +192,7 @@ main(int argc, char** argv)
|
||||
return (failcount > 0 ? 1 : 0);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
static const char*
|
||||
kind2string(int kind)
|
||||
{
|
||||
@ -206,6 +211,7 @@ kind2string(int kind)
|
||||
}
|
||||
return "Unknown";
|
||||
}
|
||||
#endif
|
||||
|
||||
static char*
|
||||
expand(const char* s)
|
||||
|
Loading…
Reference in New Issue
Block a user