summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-02-17 14:55:42 (GMT)
committerGitHub <noreply@github.com>2021-02-17 14:55:42 (GMT)
commit7cf4913baf1fade3b6095c6f120c882246f94e94 (patch)
tree8150f446e97010ac2daa1581a14f66769dfb7908
parent679bc678cf139232499d90b84e4c575af7d42261 (diff)
downloadhdf5-7cf4913baf1fade3b6095c6f120c882246f94e94.zip
hdf5-7cf4913baf1fade3b6095c6f120c882246f94e94.tar.gz
hdf5-7cf4913baf1fade3b6095c6f120c882246f94e94.tar.bz2
1 10 merge recent changes from develop (#345)
* HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop
-rw-r--r--CMakeLists.txt2
-rwxr-xr-xbin/genparser7
-rw-r--r--config/cmake/H5pubconf.h.in23
-rw-r--r--hl/examples/ex_ds1.c4
-rw-r--r--hl/fortran/examples/ex_ds1.f903
-rw-r--r--hl/src/H5LTanalyze.c4
-rw-r--r--hl/src/H5LTparse.c4
-rw-r--r--tools/lib/h5tools_dump.c2
8 files changed, 38 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5665f98..0cd8c6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -237,7 +237,7 @@ string (REGEX REPLACE ".*#define[ \t]+H5_VERS_MINOR[ \t]+([0-9]*).*$"
"\\1" H5_VERS_MINOR ${_h5public_h_contents})
string (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$"
"\\1" H5_VERS_RELEASE ${_h5public_h_contents})
-string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._\-]*)\".*$"
+string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._-]*)\".*$"
"\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents})
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (TRACE "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}")
diff --git a/bin/genparser b/bin/genparser
index ab40775..183b3c9 100755
--- a/bin/genparser
+++ b/bin/genparser
@@ -219,13 +219,15 @@ perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' ${path_to_hl_src}/H5
#
# Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions
# will simply ignore them, but we want to avoid those warnings.
+#
+# Note also that although clang defines __GNUC__, it doesn't support every
+# warning that GCC does.
for f in ${path_to_hl_src}/H5LTparse.c ${path_to_hl_src}/H5LTanalyze.c
do
echo '#if defined (__GNUC__) ' >> tmp.out
echo '#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wconversion" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wmissing-prototypes" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wnested-externs" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wold-style-definition" ' >> tmp.out
@@ -234,8 +236,11 @@ do
echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wstrict-overflow" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out
+ echo '#if !defined (__clang__) ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=const" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" ' >> tmp.out
+ echo '#endif ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wswitch-default" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wunused-function" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wunused-macros" ' >> tmp.out
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 5c2177a..6e797df 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -602,6 +602,7 @@
#cmakedefine H5_SIZEOF_INT_LEAST8_T @H5_SIZEOF_INT_LEAST8_T@
#if !defined(__APPLE__)
+
/* The size of `size_t', as computed by sizeof. */
#cmakedefine H5_SIZEOF_SIZE_T @H5_SIZEOF_SIZE_T@
@@ -611,8 +612,17 @@
/* The size of `long', as computed by sizeof. */
#cmakedefine H5_SIZEOF_LONG @H5_SIZEOF_LONG@
+/* The size of `long double', as computed by sizeof. */
+#cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@
+
#else
- # if defined(__LP64__) && __LP64__
+
+ /* On Apple, to support Universal Binaries (where multiple CPU
+ architectures exist in one library/executable), we can't assume
+ the machine doing the compiling has the same endianness or type
+ sizes as all the various architectures (PowerPC, Intel, ARM). */
+
+ # if defined(__LP64__) && __LP64__
#define H5_SIZEOF_LONG 8
#define H5_SIZEOF_SIZE_T 8
#define H5_SIZEOF_SSIZE_T 8
@@ -622,10 +632,15 @@
#define H5_SIZEOF_SSIZE_T 4
# endif
-#endif
+ # if defined(__i386__) || defined(__x86_64__)
+ #define H5_SIZEOF_LONG_DOUBLE 16
+ # elif defined(__aarch64__)
+ #define H5_SIZEOF_LONG_DOUBLE 8
+ # else
+ #cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@
+ # endif
-/* The size of `long double', as computed by sizeof. */
-#cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@
+#endif
/* Define size of long long and/or __int64 bit integer type only if the type
exists. */
diff --git a/hl/examples/ex_ds1.c b/hl/examples/ex_ds1.c
index af8b581..09f398b 100644
--- a/hl/examples/ex_ds1.c
+++ b/hl/examples/ex_ds1.c
@@ -91,9 +91,11 @@ main(void)
if (H5DSattach_scale(did, dsid, DIM1) < 0)
goto out;
- /* close DS id */
+ /* close DS ids */
if (H5Dclose(dsid) < 0)
goto out;
+ if (H5Dclose(did) < 0)
+ goto out;
/* close file */
H5Fclose(fid);
diff --git a/hl/fortran/examples/ex_ds1.f90 b/hl/fortran/examples/ex_ds1.f90
index b31ac8e..3e0048a 100644
--- a/hl/fortran/examples/ex_ds1.f90
+++ b/hl/fortran/examples/ex_ds1.f90
@@ -180,8 +180,9 @@ PROGRAM example_ds
WRITE(*,'(/,5X,A,I0,2A,/)') 'Dimension Scale Label for dimension ', DIM2, ' is ... ', label(1:label_len)
- ! close DS id
+ ! close DS ids
CALL H5Dclose_f(dsid, err)
+ CALL H5Dclose_f(did, err)
! close file
CALL H5Fclose_f(fid, err)
diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c
index 4adf3d3..3c6983a 100644
--- a/hl/src/H5LTanalyze.c
+++ b/hl/src/H5LTanalyze.c
@@ -2,7 +2,6 @@
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
-#pragma GCC diagnostic ignored "-Wlarger-than="
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#pragma GCC diagnostic ignored "-Wnested-externs"
#pragma GCC diagnostic ignored "-Wold-style-definition"
@@ -11,8 +10,11 @@
#pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wstrict-overflow"
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#if !defined (__clang__)
+#pragma GCC diagnostic ignored "-Wlarger-than="
#pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+#endif
#pragma GCC diagnostic ignored "-Wswitch-default"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-macros"
diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c
index 80de0a2..2ef133f 100644
--- a/hl/src/H5LTparse.c
+++ b/hl/src/H5LTparse.c
@@ -2,7 +2,6 @@
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
-#pragma GCC diagnostic ignored "-Wlarger-than="
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#pragma GCC diagnostic ignored "-Wnested-externs"
#pragma GCC diagnostic ignored "-Wold-style-definition"
@@ -11,8 +10,11 @@
#pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wstrict-overflow"
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#if !defined (__clang__)
+#pragma GCC diagnostic ignored "-Wlarger-than="
#pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+#endif
#pragma GCC diagnostic ignored "-Wswitch-default"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-macros"
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 98d7835..d60207b 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -329,7 +329,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont
* Purpose: Print some values from an attribute referenced by object reference.
*
* Description:
- * This is a special case subfunction to dump aa attribute references.
+ * This is a special case subfunction to dump an attribute reference.
*
* Return:
* The function returns False if the last dimension has been reached, otherwise True