From a975a8d0eb3244d1a08afc80133a12279d1f90e5 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 7 Aug 2020 11:50:22 -0700 Subject: Removes unsuffixed float warnings These warnings can only be addressed with gnu extensions. --- config/gnu-warnings/4.8 | 3 +++ config/gnu-warnings/developer-4.8 | 1 - config/gnu-warnings/no-developer-4.8 | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/gnu-warnings/4.8 b/config/gnu-warnings/4.8 index c7e3dd1..05f4d92 100644 --- a/config/gnu-warnings/4.8 +++ b/config/gnu-warnings/4.8 @@ -9,6 +9,9 @@ # warning flag added for GCC >= 4.5 -Wstrict-overflow=5 +# This warning can only be truly addressed using the gcc extension of +# using D to indicate doubles (e.g., 1.23D). +-Wno-unsuffixed-float-constants # warning flags added for GCC >= 4.6 -Wdouble-promotion diff --git a/config/gnu-warnings/developer-4.8 b/config/gnu-warnings/developer-4.8 index fd76f6c..bfd15a1 100644 --- a/config/gnu-warnings/developer-4.8 +++ b/config/gnu-warnings/developer-4.8 @@ -5,7 +5,6 @@ # the variable is never *used* before it has been initialized? # -Wjump-misses-init --Wunsuffixed-float-constants # developer warning flag added for GCC >= 4.6 -Wsuggest-attribute=const diff --git a/config/gnu-warnings/no-developer-4.8 b/config/gnu-warnings/no-developer-4.8 index 1e29c78..09a9a96 100644 --- a/config/gnu-warnings/no-developer-4.8 +++ b/config/gnu-warnings/no-developer-4.8 @@ -1,6 +1,5 @@ # no-developer warning flag added for GCC >= 4.5 -Wno-jump-misses-init --Wno-unsuffixed-float-constants # no-developer warning flag added for GCC >= 4.6 -Wno-suggest-attribute=const -- cgit v0.12 From 0ed65346033e7fbc71634d4911f9761e2ec145b2 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 7 Aug 2020 12:40:04 -0700 Subject: Fixes flock Windows failure --- test/h5test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/h5test.c b/test/h5test.c index 255932a..497a5f2 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -2255,15 +2255,15 @@ done: *------------------------------------------------------------------------- */ herr_t -h5_check_if_file_locking_enabled(hbool_t *are_enabled) +h5_check_if_file_locking_enabled(hbool_t *is_enabled) { const char *filename = "locking_test_file"; - mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; + int pmode = O_RDWR | O_CREAT | O_TRUNC; int fd = -1; - *are_enabled = TRUE; + *is_enabled = TRUE; - if((fd = HDcreat(filename, mode)) < 0) + if((fd = HDopen(filename, pmode, H5_POSIX_CREATE_MODE_RW)) < 0) goto error; /* Test HDflock() to see if it works */ @@ -2277,7 +2277,7 @@ h5_check_if_file_locking_enabled(hbool_t *are_enabled) * error condition. */ errno = 0; - *are_enabled = FALSE; + *is_enabled = FALSE; } else goto error; @@ -2293,7 +2293,7 @@ h5_check_if_file_locking_enabled(hbool_t *are_enabled) return SUCCEED; error: - *are_enabled = FALSE; + *is_enabled = FALSE; if (fd > -1) { HDclose(fd); HDremove(filename); -- cgit v0.12