diff options
author | hdftest <hdftest@hdfgroup.org> | 2020-04-27 13:09:20 (GMT) |
---|---|---|
committer | hdftest <hdftest@hdfgroup.org> | 2020-04-27 13:09:20 (GMT) |
commit | bf5029051ccfb4184903b4e12f87695beb806986 (patch) | |
tree | e13a7d4747ed1f50e74e543fbbbd69aad5802bd5 /src/H5FDdirect.c | |
parent | 60778cb623315d98b911938df3e503f9902668b5 (diff) | |
parent | 8a4905b9d329b582b04d1cc2705d9e367f4dd20b (diff) | |
download | hdf5-bf5029051ccfb4184903b4e12f87695beb806986.zip hdf5-bf5029051ccfb4184903b4e12f87695beb806986.tar.gz hdf5-bf5029051ccfb4184903b4e12f87695beb806986.tar.bz2 |
Merge pull request #2528 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_12 to hdf5_1_12
* commit '8a4905b9d329b582b04d1cc2705d9e367f4dd20b':
Restrict errors to gcc 4.8 and above.
Merge pull request #2537 in HDFFV/hdf5 from ~DYOUNG/werror:fix-werrors to develop
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/H5FDdirect.c')
-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 ce5e081..34c4346 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -1335,16 +1335,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") |