diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-04-27 17:10:30 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-04-27 17:10:30 (GMT) |
commit | c034efb0e2be94627d8c97b488f3b1d18a23ff2f (patch) | |
tree | a7ba7522260e5362cebe59f7d2cd3216d4a14012 /src | |
parent | 844400155918e931b16b69c59b8b76d4121005ac (diff) | |
parent | 68adfb86d056af222ab80c349c56e0bd1d183f09 (diff) | |
download | hdf5-c034efb0e2be94627d8c97b488f3b1d18a23ff2f.zip hdf5-c034efb0e2be94627d8c97b488f3b1d18a23ff2f.tar.gz hdf5-c034efb0e2be94627d8c97b488f3b1d18a23ff2f.tar.bz2 |
Merge pull request #2529 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to hdf5_1_10
* commit '68adfb86d056af222ab80c349c56e0bd1d183f09':
Merge pull request #2537 in HDFFV/hdf5 from ~DYOUNG/werror:fix-werrors to develop
Move ADD_H5_FLAGS macro from *CompilerFlags.cmake files to config/cmake_ext_mod/HDFMacros.cmake for common use.
Restrict errors to gcc 4.8 and above.
Fix NoFilter build
TRILAB-244 separate CXX warnings and errors from C
Don't add general warnings flags for unsupported old versions of gcc and g++ (older than gcc/g++ 4.2). Correct gnu-cxxflags to determine warnings flags to be added based on C++ compiler version instead of C compiler version.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDdirect.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index 906ec28..4a41403 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -1337,16 +1337,13 @@ static herr_t H5FD_direct_lock(H5FD_t *_file, hbool_t rw) { H5FD_direct_t *file = (H5FD_direct_t*)_file; /* VFD file struct */ - int lock; /* The type of lock */ + const int lock = rw ? LOCK_EX : LOCK_SH; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT HDassert(file); - /* Determine the type of lock */ - int lock = rw ? LOCK_EX : LOCK_SH; - /* Place the lock with non-blocking */ if(HDflock(file->fd, lock | LOCK_NB) < 0) HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to flock file") |