Commit Graph

3630 Commits

Author SHA1 Message Date
Dana Robinson
460ee73a64
Adds format attribute to additional functions (#1868)
* Adds format attribute to (s|p)io_perf code

* Added gcc format attribute to additional test code

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-11 08:29:46 -07:00
Dana Robinson
be5de999a9
Adds explicit indices to drivernames array in the tools (#1867)
Will help keep the drivernames and driver_idx enum in sync.
2022-07-11 08:28:52 -07:00
Dana Robinson
6aa7aeeda4
Fixes a bug in h5perf that causes file open failures (#1846)
When the filename was flipped from being a static array to being
dynamically allocated, the sizeof(filename) call wasn't updated.
This always returns the size of the pointer, truncating the
filename.
2022-07-01 12:53:45 -07:00
Dana Robinson
03ed7a3d79
Fixes a few minor parallel warnings (#1832) 2022-06-29 13:02:38 -07:00
Sean McBride
c064d3481b
sprintf to snprintf (#1815)
* Straightforward conversion of sprintf to the safer snprintf

* Trickier conversion of sprintf to safer snprintf

This involved minor changes to private function signatures to take the size of the buffer.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 11:58:18 -07:00
Sean McBride
8b2e7b32b5
Various warning fixes (#1812)
* Fixed -Wreserved-id-macro warnings from header include guards

* Removed all __int64 and LL suffix stuff now that C99 is minimum requirement

* Rename `H5FD_CTL__` to `H5FD_CTL_` to fix -Wreserved-id-macro warnings

Double underscore is reserved in C++ and this public header should be C++ compatible.

* Never define __STDC_FORMAT_MACROS anymore

Defining it causes a -Wreserved-id-macro.

Happily, according to the C++11 standard:

"The macros defined by <stdint> are provided unconditionally. In particular, the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in C99 footnotes 219, 220, and 222) play no role in C++."

https://cplusplus.github.io/LWG/issue984

So looks like it's not necessary to define it with reasonably new toolchains.

* Fixed some -Wunused-macros warnings, removed dead code

* Fixed all -Wdouble-promotion warnings in C++ files

* Fixed remaining -Wsuggest-destructor-override warnings

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 09:16:30 -07:00
jhendersonHDF
13985a7f52
Fixes for S3 and HDFS VFDs with tools (#1740) 2022-05-06 11:06:07 -07:00
Dana Robinson
08861aa903
Fixes unused/unset variable warnings from aocc (#1712)
* Fixes unused/unset variable warnings from aocc

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-02 19:25:57 -05:00
Dana Robinson
336ead720e
Clean stack size warnings in sio_engine (#1687) 2022-04-25 12:17:33 -05:00
jhendersonHDF
2b323159a7
Warnings fixes (#1680) 2022-04-25 12:16:18 -05:00
H. Joe Lee
463ef39bc7
OESS-168: Remove clang warnings. (#1376) 2022-04-15 13:19:21 -07:00
Allen Byrne
b6398dd60e
Move error-stack text to top of usage display (#1564)
* Move error-stack text to top of usage display

* Add optional tag ti list

* format changes

* Revert incorrect change
2022-04-01 15:55:22 -05:00
Scot Breitenfeld
e8ea850004
spelling fixes (#1561) 2022-03-31 10:42:30 -05:00
Dana Robinson
1f9228316c
Fixes for format string warnings raised by -Wformat=2/-Wformat-security (#1489) 2022-03-11 13:10:20 -06:00
Dana Robinson
01209d2777
Removes remaining register keywords (#1481) 2022-03-10 16:14:05 -06:00
Allen Byrne
16f482de8f
Remove addition of non-standalone use of H5_ATTR_FORMAT (#1470) 2022-03-07 08:32:45 -06:00
Larry Knox
94d01f5377
Update version to 1.13.2-1 after 1.13.1 release; add new Makefile.in files to MANIFEST (#1460) 2022-03-01 14:20:34 -06:00
David Young
c302773438
Sprinkle H5_ATTR_FORMAT over printf(3)-like functions in tools and fix issues (#1423)
* Correct some conversion specifications.

* Replace many "%lld" occurrences with "%" PRIuHSIZE except for a few
instances where PRIdHSIZE was appropriate.  Remove a couple of casts and
use correct format strings, instead.

* Copy values from a possibly unaligned buffer to aligned local variables
instead of casting and dereferencing pointers into the buffer.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-21 15:31:57 -06:00
David Young
4ce6373a0b
Make a buffer bigger: GCC 8.3.0 warned that a snprintf may be (#1403)
truncated because the recipient buffer was too small, and the warning is
one that we promote to an error.  Now there is a warning that the buffer
is too big (-Wlarger-than=), but we don't promote those to errors, yet.
2022-02-11 07:39:52 -06:00
jhendersonHDF
36d9a165e4
Fix a few issues noted by LGTM (#1421) 2022-02-04 10:53:55 -06:00
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
Allen Byrne
ad71539d30
Remove const from the argv tools/tests main sig. (#1390)
* Remove const from the argv tools/tests main sig.

* also remove const from H5_get_option and parse_command_line.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-28 16:30:33 -06:00
Sean McBride
b5eed1b563
Replaced several uses of sprintf with safer snprintf (#1383)
* Replaced several uses of sprintf with safer snprintf

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-28 10:34:57 -06:00
Sean McBride
44de59b642
Used clang-tidy to change all floating point f suffixes to F (#1359) 2022-01-28 08:31:26 -06:00
H. Joe Lee
db61a888e6
OESS-168: Remove clang warnings. (#1295) 2021-12-15 16:22:04 -06:00
H. Joe Lee
c60bc0a07c
OESS-168: Remove clang warnings. (#1294) 2021-12-15 16:21:42 -06:00
H. Joe Lee
8c592a2f64
OESS-168: Remove clang warnings. (#1277) 2021-12-10 09:45:14 -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
Allen Byrne
5fddfb8016
Fix windows test with floating point rounding issues (#1237)
* Check windows sdk version for test

* Correct variable reference form

* Use VERSION_LESS in IF check
2021-11-30 13:39:56 -06:00
Larry Knox
89ad105b1c
Update version to 1.13.1-1 after creation of branch for 1.13.0 release. (#1236) 2021-11-30 12:53:45 -06:00
David Young
462e9a373f
Create 2D arrays on the heap in a different way (#1169)
* Create 2D arrays on the heap by malloc'ing `struct { TYPE arr[ROWS][COLS];
}`.  This avoids the double-indirection through pointers and the
additional memory of H5TEST_ALLOCATE_2D_ARRAY().

This change will safely quiet the cast warning that PR #1129 was
intended to fix.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-23 08:09:05 -06:00
David Young
4b9ca8e1f6
Avoid calling H5Ropen_object with a misaligned H5R_ref_t: copy the (#1171)
* Avoid calling H5Ropen_object with a misaligned H5R_ref_t: copy the
raw H5R_ref_t bytes to a heap buffer that's known to have the right
alignment.

* Committing clang-format changes

* Use an automatic H5R_ref_t instead of malloc'ing one.  Go ahead and
initialize the H5R_ref_t to all-0s so that arbitrary stack content
doesn't foul things up.  Bail out with an error if `size` exceeds
`sizeof(H5R_ref_t)`.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-23 08:05:01 -06:00
Dana Robinson
49f7e00ebe
Quiets a 'set but not used' warning in h5diff_array.c (#1210) 2021-11-18 16:57:30 -06:00
Allen Byrne
6b737bf4cf
Add option for h5repack timing (#1142)
* Add timing option to h5repack

* Adjust help text

* fix format

* fix typos

* Correct spacing

* Change timing to use H5Timer

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-08 13:48:58 -06:00
Sean McBride
9cea7c9bb9
Assume C99 fixed sized ints exist, use them (#470)
* Committing clang-format changes

* Assume C99 fixed sized ints exist, use them

* Assume H5_SIZEOF_LONG_DOUBLE != 0, `long double` has existed since C89

Note, this is only assuming that `long double` exists, no assumptions about its size have been touched.  Didn't remove any code that does things like test if `long double` and `double` have different sizes.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-08 12:44:06 -06:00
Allen Byrne
fabdce56ef
Split dir create into separate macro (#1141)
* Split dir create into separate macro

* Correct VFD settings
2021-10-28 07:49:28 -05:00
Larry Knox
8d1fe44164
H5repack tests should fail if a corrupted file causes h5repack to (#1138)
* H5repack tests should fail if a corrupted file causes h5repack to
segfault/core dump.

* Add release note for HDFV-10590, CVE-2018-17432.
2021-10-25 21:17:44 -05:00
Allen Byrne
aee9e06aa8
Consolidate VFD create list macro (#1132) 2021-10-25 21:17:23 -05:00
Allen Byrne
6d4d0fb13d
Move test utilities to utils/test folder (#1109)
* Move test utilities to utils/test folder

* Fix makefile assignment

* Add new dir

* add new folder

* Correct copied makefile

* Fix dir typo

* Add missing include dir

* Remove unnecessary lib link

* Correct dependent dirs

* Fix conditional checks

* Disable test if not built

* fix path to executable

* Use fixture for swmr_vfd check

* Add release note

* Correct shell tests and c++ flag warning

* Update autotools c++ warning

* Fix typo
2021-10-20 08:25:06 -05:00
H. Joe Lee
e2cdb618ae
OESS-168: Remove clang warnings. (#1074)
* OESS-168: Remove clang warnings.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-10-06 16:25:40 -05:00
Allen Byrne
eca8d5b767
Fix ASAN issue in h5dump error path (#1051)
* Fix ASAN issue in h5dump error path

* Rework error allocation free.
2021-10-03 08:06:08 -05:00
H. Joe Lee
1f7ddf47f5
OESS-168: Remove clang warnings. (#1057)
* OESS-168: Remove clang warnings.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-30 10:45:33 -05:00
H. Joe Lee
80c041d6da
OESS-168: Remove clang warnings. (#1056) 2021-09-30 10:45:08 -05:00
jhendersonHDF
3da0802c40
VFD plugins (#602)
* Implement support for loading of Virtual File Drivers as plugins

Fix plugin caching for VOL connector and VFD plugins

Fix plugin iteration to skip paths that can't be opened

* Enable dynamic loading of VFDs with HDF5_DRIVER environment variable

* Temporarily disable error reporting during H5F_open double file open

* Default to using HDstat in h5_get_file_size for unknown VFDs

* Use macros for some environment variables that HDF5 interprets

* Update "null" and "ctl testing" VFDs
2021-09-29 13:28:12 -05:00
H. Joe Lee
0fa5836cc5
OESS-168: Remove clang warnings. (#1050)
This patch will remove clang double-promotion warning.
2021-09-29 08:59:47 -05:00
H. Joe Lee
c7d7942510
OESS-168: Remove clang warnings (#1049)
This patch will remove clang double-promotion warning.
2021-09-29 08:59:34 -05:00
H. Joe Lee
35cf4a69bf
OESS-168: Remove clang warnings. (#1047)
This patch will remove clang warnings on Mac:

      'float' to 'double' [-Wdouble-promotion]
2021-09-29 08:59:24 -05:00
H. Joe Lee
9e319d403c
OESS-168: Remove clang warnings. (#1046)
This patch will remove clang warnings on Mac:

``` warning: implicit conversion increases floating-point precision:
      'float' to 'double' [-Wdouble-promotion]
```
2021-09-29 08:59:11 -05:00
Sean McBride
1f2bba5255
Modified gcc/clang warning suppression macros to account for some warnings flags being supported by one compiler but not the other (#379)
* Committing clang-format changes

* Fixed GCC warning suppression pragmas to also work with clang

H5_GCC_DIAG_ON remains gcc-only.

Added a new H5_CLANG_DIAG_ON that's clang-only, but it's not used anywhere currently.

Added a new H5_GCC_CLANG_DIAG_ON that works with both compilers, which afterall support mostly the same warnings.  Changed almost all uses of H5_GCC_DIAG_ON to use H5_GCC_CLANG_DIAG_ON, with the exception of a couple, where they really were suppressing gcc-only warnings.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-16 07:42:20 -05:00
jhendersonHDF
cd2ca91875
Fix several warnings (#720) 2021-09-14 15:24:01 -05:00