Commit Graph

478 Commits

Author SHA1 Message Date
Sean McBride
4ac6ccc021
Snprintf2 (#1399)
* Replaced many uses of sprintf with safer snprintf

Many very straightforward, but in a few cases added a length parameter to some private functions, because buffer length was otherwise unknowable.

* Removed unnecessary use of static on small buffers

This improves thread safety.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-28 16:43:48 -06:00
Scot Breitenfeld
f859cb732b
Fixed Spelling Errors (#1166)
* fixed missed closing of a dataset

* fixed missed closing of a dataset

* fixed typo in error return

* Committing clang-format changes

* minor edits

* code format

* Committing clang-format changes

* code format

* minor edit

* switched from using MPI_count, to actual bytes written for H5FD_mpio_debug rw debugging

* Committing clang-format changes

* changed size_i in printf to reflect the I/O.

* Committing clang-format changes

* Fixed seg fault with xlf on BE with -qintsize=8

* fixed error function string

* spelling corrections via codespell, added new spell check github actions

* Committing clang-format changes

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* Committing clang-format changes

* misc

* misc

* misc

* misc

* misc

* misc

* Committing clang-format changes

* misc

* work around for https://github.com/codespell-project/codespell/issues/2137

* misc

* added missing file

* misc

* misc.

* misc

* switch to using Codespell with GitHub Actions

* misc.

* misc.

* fixed more sp errors

* Fix new typos found by codespell.

* fixed proceed with precede

* fixed variable in fortran test

* fixed minnum

* updated spelling list

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-12-07 08:27:29 -06:00
Sean McBride
f6c49fe891
More clang tidy (#908)
* Pacify clang-analyzer-unix.cstring.NullArg

* Apply some bugprone-suspicious-string-compare

* Apply some readability-simplify-boolean-expr

* Apply some readability-make-member-function-const

* Apple some bugprone-macro-parentheses

* Changed an f suffix to L for `long double`

* Applied some readability-uppercase-literal-suffix automatically

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-23 16:14:53 -05:00
Dana Robinson
9ebe55b34c
Moves H5PacketTable default ctor inside source file (#731) 2021-06-05 23:00:30 -05:00
Dana Robinson
50d0888f49
C++ warning and build fixes (#707)
* Committing clang-format changes

* C++ build and warning updates

* Fixes all warnings on C++ (with gcc 9.3)
* Updates CMake and Autotools C++ builds

* Undo warning clobber

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-01 08:49:39 -05:00
Allen Byrne
02de350b39
Remove version from pkgcfg file names (#671)
* OESS-98 convert plugin option to FetchContent, add tests

* Fixes for pkcfg files because of plugin option

* OESS-98 fix tools test for plugins

* Keep doxygen comments under 100 chars long - format hint

* Whitespace

* HDFFV-11144 - Reclassify CMake messages

* HDFFV-11099/11100 added help text

* Reworked switch statement to compare string instead

* Fix typo

* Update CDash mode

* Correct name of threadsafe

* Correct option name

* Undo accidental commit

* Note LLVM 10 to 11 format default changes

* Update format plugin

* Undo clang-format version 11 changes

* One more correction

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

* Fortran target depends

* Remove incorrect source attribute

* doxygen adjustments

* doxygen build updates

* Correct version

* Correct function version - function has been merged to 1.12

* Correct version string for map functions

* Cleanup warnings for tools debug builds

* TRILAB-227 - fix indexing for h5diff selections

* Correct location of pos to index function call

* TRILAB-227 Enable test

* Quote subset args

* Use MATCHES because of AppleClang

* if blocks needed for build modes

* Update list of DT platforms

* VS2019 correctly displays float values

* revert VS2019 change

* Issue #669 remove version from pkgcfg filename

* remove version from h5cc script

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-21 17:08:36 -05:00
Allen Byrne
00dc456cec
Parallel builds need the mpi compiler for pkgconfig scripts. (#599)
* OESS-98 convert plugin option to FetchContent, add tests

* Fixes for pkcfg files because of plugin option

* OESS-98 fix tools test for plugins

* Keep doxygen comments under 100 chars long - format hint

* Whitespace

* HDFFV-11144 - Reclassify CMake messages

* HDFFV-11099/11100 added help text

* Reworked switch statement to compare string instead

* Fix typo

* Update CDash mode

* Correct name of threadsafe

* Correct option name

* Undo accidental commit

* Note LLVM 10 to 11 format default changes

* Update format plugin

* Undo clang-format version 11 changes

* One more correction

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments

* GH #386 java folder copyright corrections

* Whitespace

* GH #359 implement and fix tools 1.6 API usage

* remove excessive comments

* Flip inits to correct ifdef section

* rework ifdef to be simpler

* format issue

* Reformat ifdef inits

* remove static attribute

* format compliance

* Update names

* Revert because logic relies on float not being int

* Changes noticed from creating merge of #412

* Double underscore change

* Correct compiler version variable used

* Remove header guard underscores

* Whitespace cleanup

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* correct window os name

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

* HDFFV-11113 long double in tools

* HDFFV-11113 add note

* Disable long double tests for now

* HDFFV-11228 remove arbitrary CMake warning groups.

* Make each flag a string

* Some Javadoc warning fixes

* Updated javadoc fixes

* # WARNING: head commit changed in the meantime

HDFFV-11229 Fix long double usage in tools and java

Changed h5dump and h5ls to just print 128-bit for long double type.
Added test and file for dataset and attributes with all three float
types.

* Committing clang-format changes

* HDFFV-11229 Add release note

* HDFFV-11229 windows testfile needed

* fix typo

* Remove non supported message text

* HDFFV-11229 - change ldouble test to check both native and general

* HDFFV-11229 add second file compare

* HDFFV-11229 fix reference file

* HDFFV-11229 autotools check two refs

* HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output

* Committing clang-format changes

* Update release note

* Update attribute type of ref file

* Change source of ninja for macs

* try port instead of brew

* Recommended is to use brew.

* Undo non long double changes

* remove unneeded file

* Fix perl and doxygen CMake code

* Add "option" command for clang options

* Rework CMake add_custom to use the BYPRODUCTS argument

* Add stamp files to BYPRODUCTS

* Only one copy of file exists

* Fix custom cmmand depends targets

* Fix fortran custom command DEPENDS

* Add LD_LIBRARY_PATH to tests

* Add custom target for DEPENDS

* Add h5detect conditionaly to generated target DEPENDS

* Correct DEPENDS targets

* Parallel builds need the mpi compiler for pkgconfig scripts.

* install only if MPI build

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-27 08:58:34 -05:00
Larry Knox
3707675c03
Update top-level COPYING file and remove COPYING files from subdirectories (#561)
* Modify temporary rpath for testing in java example scripts.

* Update URL in source file Copyright headers for web copy of COPYING (license) file.

* Add release_docs/code-conventions.md file.

* Add script to test h5py.

* Fix script error.

* Add file h5pytest.yml.

* Test declaration of counter variables in for loops.

* Committing clang-format changes

* Committing clang-format changes

* Added [] to line 126 of H5LTanalyze.l.
Ran bin/genparser with flex v2.6.4 and Bison v3.0.4 on jelly.

* Revert "Added [] to line 126 of H5LTanalyze.l."

This reverts commit e4a9cee441.

* Revert extra commits to match canonical develop.

* Update top-level COPYING file and remove COPYING files from
subdirectories.

* Remove subdirectory COPYING files from MANIFEST.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-21 11:23:34 -05:00
Dana Robinson
d3384b2e8e
Fixes incorrect usage of H5I_BADID (#554)
* Committing clang-format changes

* Fixes incorrect use of H5I_BADID

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-19 16:51:18 -05:00
Quincey Koziol
c6e4e53546
Update clang config (#473)
* Update clang config to put H5E_BEGIN_TRY / H5E_END_TRY on separate lines, empty C++ methods on separate lines, understand that ALL_MEMBERS / UNIQUE_MEMBERS are foreach macros, and properly skip the 'config' directory in the find command without emiting a warning

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-17 10:25:39 -05:00
Sean McBride
d7b40604ef
Fixed all clang-tidy bugprone-suspicious-string-compare warnings (#451)
* Fixed all clang-tidy bugprone-suspicious-string-compare warnings

This change was generated entirely by clang-tidy itself.

* Reformat code with clang v10.0.1.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-10 12:42:35 -06:00
Sean McBride
580008d5bb
More warning fixes (#400)
* Fixed -Wunused-local-typedef warning

* Fixed -Wformat warnings

In one case also removed a `z` character. There was a `z%d` that I think was supposed to be `%zd`

* Fixed -Wshorten-64-to-32 warnings

* Fixed -Wself-assign warnings

* Fixed -Wreserved-id-macro warnings

* Commit format changes from clang-format, clang version 10.0.1.

* Fixed -Wself-assign warnings

* Fixed -Wunused-local-typedef warning

* Fixed -Wformat warnings

In two cases also removed a `z` character. There was a `z%d` that was supposed to be `%zd`.

* Fixed -Wshorten-64-to-32 warnings

* Fixed -Wreserved-id-macro warnings

* Fixed -Wself-assign warnings

* Format source.

* Remove blank lines to pass format check.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-04 15:06:30 -06:00
Sean McBride
c29e1b9fdf
Patches from vtk (#358)
* Drop the export attribute on forward declaration

They don't mean anything on forward declarations anyways.

* Fixed -Wunused-parameter warnings in some C++ files

Allowed all the attribute #defines to work in C++ also.

* Fixed -Wunused-variable warnings by removing dead code

* Fixed all -Wshorten-64-to-32 warnings by adjusting casts

There was no truncation in fact, since the unsigned result was upcast to size_t then implicitly downcast to uint32_t.

* Fixed all -Wcomma warnings by spliting statements onto own lines

* Fixed all -Wself-assign warnings with different unused param suppression

* Fixed all -Wextra-semi warnings

* Fixed all -Wswitch-enum warnings

Just added new explicit cases with the existing default case.

* Fixed all -Wmissing-prototypes warnings

Just made functions static. Moved them into an extern "C" block.

* Reformatted source with bin/format_source using clang version 10.0.1

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-02-25 12:15:02 -06:00
Larry Knox
2ea165efd0
Update license url part2 (#333)
* Modify temporary rpath for testing in java example scripts.

* Update URL in source file Copyright headers for web copy of COPYING
    file - files not in src or test.
2021-02-17 08:52:36 -06:00
Allen Byrne
b3934e99eb
Changes for sanitize=address (#312)
* OESS-98 convert plugin option to FetchContent, add tests

* Fixes for pkcfg files because of plugin option

* OESS-98 fix tools test for plugins

* Keep doxygen comments under 100 chars long - format hint

* Whitespace

* HDFFV-11144 - Reclassify CMake messages

* HDFFV-11099/11100 added help text

* Reworked switch statement to compare string instead

* Fix typo

* Update CDash mode

* Correct name of threadsafe

* Correct option name

* Undo accidental commit

* Note LLVM 10 to 11 format default changes

* Update format plugin

* Undo clang-format version 11 changes

* One more correction

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3
2021-02-05 10:35:05 -06:00
Allen Byrne
b1eb47ac4d
Reclassify CMake messages - HDFFV-11144 (#253)
* OESS-98 convert plugin option to FetchContent, add tests

* Fixes for pkcfg files because of plugin option

* OESS-98 fix tools test for plugins

* Keep doxygen comments under 100 chars long - format hint

* Whitespace

* HDFFV-11144 - Reclassify CMake messages
2021-01-13 08:29:15 -06:00
Allen Byrne
8183284f09
dev -Update pkgconfig settings with version - #218 (#220)
* OESS-98 convert plugin option to FetchContent, add tests

* Fixes for pkcfg files because of plugin option

* OESS-98 fix tools test for plugins

* Pkgconfig fix - #218

* Update all pkgconfig settings with version
2020-12-22 14:43:58 -06:00
Allen Byrne
faf3a2fae0
OESS-98 convert plugin option to FetchContent, add tests (#155)
* OESS-98 convert plugin option to FetchContent, add tests

* Fixes for pkcfg files because of plugin option

* Update other test machines

* OESS-98 fix tools test for plugins

* HDFFV-10865 performance improvement for java array
2020-12-16 11:59:51 -06:00
Allen Byrne
b2d661b508 Clang-format of source files 2020-09-30 09:27:10 -05:00
Allen Byrne
ff0881f35b OESS-98 merge with clang-format changes 2020-09-25 16:43:57 -05:00
Allen Byrne
30c7264c2c CMake and script changes for clang-format 2020-09-04 16:36:52 -05:00
David Young
4cebd8aa6c Make examples installation respect DESTDIR. Fixes
HDFFV-11060.
2020-05-26 10:43:20 -05:00
Allen Byrne
7f44915b44 Fix NoFilter build 2020-04-24 07:49:39 -05:00
Quincey Koziol
9e5dbf6906 Trim trailing whitespace 2020-04-20 18:12:00 -05:00
Allen Byrne
ef70c1695d Fix shadowed type 2020-04-13 10:25:44 -05:00
Allen Byrne
57f5d00a43 TRILAB-192 add c++ and fortran warnings build systems one file 2020-04-05 10:50:08 -05:00
Allen Byrne
1505fa1498 TRILAB-192 restrict extensive warnings to libraries 2020-03-24 16:45:12 -05:00
Allen Byrne
666205a55f TRILAB-142 Change minimum CMake version to 3.12 2020-02-21 16:16:06 -06:00
Allen Byrne
7022a3380c HDFFV-11001 need to qualify all by parallel or serial types 2020-01-15 12:28:53 -06:00
Allen Byrne
a0ae5e9b89 HDFFV-11001 Add fine control over testing 2020-01-15 11:38:06 -06:00
David Young
f1b39ad80e Apparently, + has no special meaning, and neither does \+, in so-called
"obsolete" / POSIX "basic" regular expressions.  Also, not every version of
`sed` out there supports the `-E` option.  So delete the -E flag and use
the regex `[^/][^/]*` instead of `[^/]+`.

Add config/netbsd to the MANIFEST.
2019-11-12 10:43:26 -06:00
David Young
0b721858e4 Make these scripts relocatable again: derive a relative path for the
original installation prefix from the examples prefix.  Use that
relative path to locate the current installation prefix, always.  Fall
back to an absolute installation prefix if the relative path cannot be
derived.
2019-11-05 15:13:47 -06:00
David Young
b8a93a7224 Let us override the examples directory using --with-examplesdir=DIR.
This is handy for NetBSD where HDF5 examples are installed
by convention in $prefix/share/examples/hdf5/ rather than in
${prefix}/share/hdf5_examples/, which is the HDF5 default.

Place hdf5_examples/ under ${datarootdir} which on most systems will be
${prefix}/share/, anyway.
2019-10-03 16:01:40 -05:00
David Young
7bb8d071c6 Under the examples directories, always find the installed HDF5
executables and scripts using @prefix@ instead of a relative
path, because the number of ../ in the relative path will be
different on NetBSD than on other systems.

Examples on NetBSD are installed at ${prefix}/share/examples/hdf5/
instead of at ${prefix}/share/hdf5_examples/, by convention.  It may be
the same on other BSDs, I'm not sure.
2019-10-03 16:01:40 -05:00
Allen Byrne
2bce24576e This test cannot use HD prefix macro with printf of fprintf 2019-08-17 13:33:41 -05:00
Allen Byrne
96bf97f534 Update HD prefix and reconcile hl/cpp test 2019-08-16 13:23:29 -05:00
Allen Byrne
64e6665b54 Add HD prefix to tests 2019-08-15 16:46:15 -05:00
Allen Byrne
6a932198aa HDFFV-10529 Update CMake tests to use test fixtures 2019-07-23 16:24:56 -05:00
Allen Byrne
f724e86727 HDFFV-10845 use of TARGETFILE disables auto emulator 2019-07-17 11:58:04 -05:00
Allen Byrne
7ba562a820 HDFFV-10845 fix configure check and PATHs 2019-07-17 11:58:03 -05:00
Allen Byrne
ae0c16d1f2 HDFFV-10581 fix locations for static pdb files 2019-07-08 12:21:11 -05:00
Allen Byrne
e7f16c6f2c HDFFV-10805 Add option to only build shared targets
HDFFV-10805 Add ONLY_SHARED_LIBS option and prefer shared over static
HDFFV-10803 Update FindSZIP.cmake find module
Remove unneeded modules and update java modules
2019-06-18 07:46:25 -05:00
Larry Knox
54a07f556c Add options to enable or disable building tools and tests. The default
is enabled for each.
2019-06-05 23:20:01 -05:00
Larry Knox
d20fd310e4 Change prefix in example scripts to relative path to bin. This was done
for 1.8, and works wherever installed without the need to replace the
original prefix.
2018-08-23 07:37:00 -05:00
Allen Byrne
37c27afde0 Fix MPI on Windows by adding MPI include folder 2018-05-09 14:29:44 -05:00
Allen Byrne
2347bffaa2 TRILABS-19 remove add_defintions and use generator expressions 2018-04-26 16:41:04 -05:00
Allen Byrne
6c82c49dd5 TRILABS-20 set a compiler name on all project commands 2018-04-20 10:11:55 -05:00
Allen Byrne
46f2a2a432 TRILABS-19 Initial conversion of include_directories to targets 2018-04-17 15:57:58 -05:00
Allen Byrne
db3d744f25 HDFFV-10444 fix soversion numbers for libraries 2018-04-10 08:55:17 -05:00
Allen Byrne
24c62ba7fe Change CMake min to 3.10 2018-03-09 12:32:06 -06:00