Skip to content

Commit

Permalink
1 12 merge recent changes from develop (#344)
Browse files Browse the repository at this point in the history
* OESS-98 fix tools test for plugins

* sync fork

* Merge of changes from dev

* Move problem option to bottom of the list until fixed

* HDFFV-11106 - fix parsing optional args

* HDFFV-11106 add note

* grammer fix

* Whitespace after clang formatting

* Undo format version 11 changes

* Update check to working version

* Merge workflow and minor changes from develop

* Update supported platforms

* PR#3 merge from develop

* Merge gcc 10 diagnostics option from develop

* Merge #318 OSX changes from develop

* Merge serval small changes from dev

* fix typo
  • Loading branch information
byrnHDF authored Feb 17, 2021
1 parent 58fd505 commit 9fced48
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
7 changes: 6 additions & 1 deletion bin/genparser
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
23 changes: 19 additions & 4 deletions config/cmake/H5pubconf.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,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@

Expand All @@ -614,8 +615,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
Expand All @@ -625,10 +635,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. */
Expand Down
4 changes: 3 additions & 1 deletion hl/examples/ex_ds1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion hl/fortran/examples/ex_ds1.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion hl/src/H5LTanalyze.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion hl/src/H5LTparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion tools/lib/h5tools_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -448,6 +448,9 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
if (H5Tclose(atype) < 0)
H5TOOLS_ERROR(dimension_break, "H5Tclose failed");

if (H5Sclose(region_space) < 0)
H5TOOLS_ERROR(dimension_break, "H5Sclose failed");

ctx->indent_level--;
ctx->need_prefix = TRUE;

Expand Down

0 comments on commit 9fced48

Please sign in to comment.