diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-08-10 21:16:11 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-08-10 21:16:11 (GMT) |
commit | f5cf503dbd6cfa237a9356b3f2548f4469c310d9 (patch) | |
tree | 345032052cbfdd15e2668748f8235d02d30d0eb4 | |
parent | a6cbcabeb8f57d20afffff9a132995356895e496 (diff) | |
download | hdf5-f5cf503dbd6cfa237a9356b3f2548f4469c310d9.zip hdf5-f5cf503dbd6cfa237a9356b3f2548f4469c310d9.tar.gz hdf5-f5cf503dbd6cfa237a9356b3f2548f4469c310d9.tar.bz2 |
[svn-r27487] Minor code cleanup to remove warnings.
Tested on: local linux VM (minor changes)
-rw-r--r-- | src/H5FDstdio.c | 8 | ||||
-rw-r--r-- | src/H5Fint.c | 2 | ||||
-rw-r--r-- | test/swmr.c | 28 |
3 files changed, 17 insertions, 21 deletions
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 1af7a9e..3dae90f 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -51,11 +51,6 @@ #endif -#ifdef MAX -#undef MAX -#endif /* MAX */ -#define MAX(X,Y) ((X)>(Y)?(X):(Y)) - /* The driver identification number, initialized at runtime */ static hid_t H5FD_STDIO_g = 0; @@ -734,6 +729,9 @@ H5FD_stdio_get_eof(const H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type) /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); + /* Quiet the compiler */ + type = type; + return(file->eof); } /* end H5FD_stdio_get_eof() */ diff --git a/src/H5Fint.c b/src/H5Fint.c index 6ea4544..93d9948 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -749,7 +749,7 @@ H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get mdc log location") if(mdc_log_location != NULL) { size_t len = HDstrlen(mdc_log_location); - if(NULL == (f->shared->mdc_log_location = HDcalloc(len + 1, sizeof(char)))) + if(NULL == (f->shared->mdc_log_location = (char *)HDcalloc(len + 1, sizeof(char)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't allocate memory for mdc log file name") HDstrncpy(f->shared->mdc_log_location, mdc_log_location, len); } diff --git a/test/swmr.c b/test/swmr.c index 18893e7..d25b97d 100644 --- a/test/swmr.c +++ b/test/swmr.c @@ -28,7 +28,6 @@ #include "hdf5.h" #include "h5test.h" -#include "H5srcdir.h" #include "H5Iprivate.h" /* @@ -87,7 +86,7 @@ static int test_file_lock_concur(hid_t fapl); static int test_file_lock_swmr_concur(hid_t fapl); /* Tests for SWMR VFD flag */ -static int test_swmr_vfd_flag(); +static int test_swmr_vfd_flag(void); /* * Tests for H5Pget/set_metadata_read_attemps(), H5Fget_metadata_read_retry_info() @@ -1826,9 +1825,9 @@ test_err_start_swmr_write(hid_t in_fapl) /* Should fail to create the file with SWMR write access when not using latest format */ H5E_BEGIN_TRY { - ret = H5Fcreate(filename, H5F_ACC_TRUNC|H5F_ACC_SWMR_WRITE, H5P_DEFAULT, in_fapl); + fid = H5Fcreate(filename, H5F_ACC_TRUNC|H5F_ACC_SWMR_WRITE, H5P_DEFAULT, in_fapl); } H5E_END_TRY; - if(ret >= 0) + if(fid >= 0) TEST_ERROR @@ -2002,9 +2001,9 @@ test_err_start_swmr_write(hid_t in_fapl) /* Should fail to open the file with SWMR write access when not using latest format */ H5E_BEGIN_TRY { - ret = H5Fopen(filename, H5F_ACC_RDWR|H5F_ACC_SWMR_WRITE, in_fapl); + fid = H5Fopen(filename, H5F_ACC_RDWR|H5F_ACC_SWMR_WRITE, in_fapl); } H5E_END_TRY; - if(ret >= 0) + if(fid >= 0) TEST_ERROR /* Case 2 */ @@ -2160,7 +2159,6 @@ test_start_swmr_write_concur(hid_t in_fapl) { hid_t fid; /* File ID */ hid_t fapl; /* File access property list */ - herr_t ret; /* Generic return value */ pid_t childpid=0; /* Child process ID */ pid_t tmppid; /* Child process ID returned by waitpid */ int child_status; /* Status passed to waitpid */ @@ -2218,9 +2216,9 @@ test_start_swmr_write_concur(hid_t in_fapl) /* Should fail */ H5E_BEGIN_TRY { /* Open the test file */ - ret = H5Fopen(filename, H5F_ACC_RDONLY|H5F_ACC_SWMR_READ, fapl); + fid = H5Fopen(filename, H5F_ACC_RDONLY|H5F_ACC_SWMR_READ, fapl); } H5E_END_TRY; - if(ret >= 0) + if(fid >= 0) exit(1); exit(0); @@ -2323,9 +2321,9 @@ test_start_swmr_write_concur(hid_t in_fapl) /* Should fail in opening the test file */ H5E_BEGIN_TRY { - ret = H5Fopen(filename, H5F_ACC_RDONLY, fapl); + fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl); } H5E_END_TRY; - if(ret >= 0) + if(fid >= 0) exit(1); exit(0); @@ -2378,9 +2376,9 @@ test_start_swmr_write_concur(hid_t in_fapl) /* Should fail in opening the test file */ H5E_BEGIN_TRY { - ret = H5Fopen(filename, H5F_ACC_RDWR, fapl); + fid = H5Fopen(filename, H5F_ACC_RDWR, fapl); } H5E_END_TRY; - if(ret >= 0) + if(fid >= 0) exit(1); exit(0); @@ -2433,9 +2431,9 @@ test_start_swmr_write_concur(hid_t in_fapl) /* Should fail in opening the test file */ H5E_BEGIN_TRY { - ret = H5Fopen(filename, H5F_ACC_RDWR|H5F_ACC_SWMR_WRITE, fapl); + fid = H5Fopen(filename, H5F_ACC_RDWR|H5F_ACC_SWMR_WRITE, fapl); } H5E_END_TRY; - if(ret >= 0) + if(fid >= 0) exit(1); exit(0); |