Commit Graph

3959 Commits

Author SHA1 Message Date
Dana Robinson
a5f1fb01b9
Remove some "Programmer" comments (#3209)
These are meaningless noise.

Removes the "Programmer" lines on comment start lines:

    /* Programmer: John Smith

These complicate my sed script that will rip out the rest of
the comments.
2023-06-29 06:33:49 -07:00
Dana Robinson
dd39b54c95
Rename HDato*() to ato*() (#3201) 2023-06-29 06:33:09 -07:00
Dana Robinson
a90bdbbcfc
Remove HD from protected POSIX calls (#3203)
These calls are non-C99 but protected by ifdefs and have no Windows
equivalents:
* HDalarm
* HDasprintf
* HDclock_gettime
* HDfcntl
* HDgethostname
* HDgetrusage
* HDsymlink
2023-06-29 06:32:40 -07:00
Dana Robinson
aebac33a1f
Remove HD from memory allocate/free calls (#3195)
* HDcalloc
* HDfree
* HDmalloc
* HDrealloc
2023-06-28 15:48:12 -07:00
Dana Robinson
605cea4af6
Remove HD from HDposix_memalign() (#3196)
The posix_memalign call is only used in the direct VFD, which can only
be built if posix_memalign() is available.
2023-06-28 13:03:45 -07:00
Dana Robinson
187ea8a9ae
Rename HD(f)printf() to (f)printf() (#3194) 2023-06-28 08:31:32 -07:00
Dana Robinson
7a44581a84
Rename HDassert() to assert() (#3191)
* Change HDassert to assert

* Fix bin/make_err
2023-06-28 07:31:56 -07:00
Dana Robinson
622fcbd138
Rename HDpipe() to pipe() (#3192)
Pipe is POSIX but implemented in Microsoft's CRT
2023-06-28 07:31:08 -07:00
Dana Robinson
6df077953e
Rename HDqsort() to qsort() (#3193)
* Rename HDqsort() to qsort()

* Committing clang-format changes

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-28 07:30:54 -07:00
Dana Robinson
7d1fdb2d27
Remove HD from fork/exec*/wait* (#3190)
These are not C99 but are hidden behind ifdefs and are highly
unlikely to ever have non-POSIX equivalents.
2023-06-27 21:35:55 -07:00
Dana Robinson
d81e751d41
Remove HDva_(arg|copy|end|start) (#3184) 2023-06-27 17:43:23 -07:00
Dana Robinson
56513d9df7
Remove dead code behind #ifdef OLD_WAY (#3163) 2023-06-20 22:37:07 -07:00
Sean McBride
65d8c93470
Many fixes to various compiler warnings (#3124)
* Fixed various -Wmissing-variable-declarations by adding static keyword
* In a few cases, renamed the variable suffix from _g to _s.
* Fixed some -Wmissing-variable-declarations by using different declaration macros
* Fixed various -Wconditional-uninitialized warnings by just initializing variable to zero
* Fixed various -Wcomma warnings
* Fixed clang -Wstrict-prototypes warnings
* Fixed various -Wunused-variable warnings
* Updated some casts to fix the only 3 -Wcast-qual warnings
* Fixed the only -Wsometimes-uninitialized warning
2023-06-18 22:13:38 -07:00
Dana Robinson
546d79dad7
Remove HD prefix from network calls (#3142)
HDsocket(), etc. Only affects the mirror VFD and its test code.
2023-06-16 00:16:29 -07:00
Sean McBride
68eba3da69
Many clang -Wextra-semi-stmt fixes (#2537)
* Adds semicolons to function-like macros
* Adds a do..while(0) loop to some macros
* Removes semicolons when inappropriate, especially H5E_TRY_BEGIN/END
2023-06-15 21:49:02 -07:00
Dana Robinson
fcdd0ab9dc
Revert long double checks (#3133)
* Revert "Remove long double conversion work-arounds (#3097)"

This reverts commit 1e1dac1dac.

* Update comments to reflect newer systems
2023-06-15 09:13:22 -07:00
H. Joe Lee
9a8c5810ed
Fix function name in comment in ros3 VFD (#3131) 2023-06-15 07:29:35 -07:00
Dana Robinson
b571da18fc
Fix spelling issues flagged by codespell (#3130) 2023-06-14 18:59:09 -07:00
Dana Robinson
9e7e2f8b8e
Fix a misc warning in test/vol.c (#3112)
The compiler complains about using integers instead of size_t
for some sizes.
2023-06-13 07:56:39 -07:00
Dana Robinson
1e1dac1dac
Remove long double conversion work-arounds (#3097)
Several options and public symbols that were provided to paper
      over non-standard long double conversions between signed/unsigned
      long and long long values were removed from the Autotools and
      CMake. These were added twenty years ago, when C99 and 64-bit
      platforms were less common and are no longer needed.

      Autotools:
        --enable-dconv-accuracy

      CMake:
        HDF5_WANT_DATA_ACCURACY

      H5pubconf.h symbols:
        H5_WANT_DATA_ACCURACY
        H5_LDOUBLE_TO_LONG_SPECIAL
        H5_LONG_TO_LDOUBLE_SPECIAL
        H5_LDOUBLE_TO_LLONG_ACCURATE
        H5_LLONG_TO_LDOUBLE_CORRECT
        H5_DISABLE_SOME_LDOUBLE_CONV
2023-06-12 14:12:57 -07:00
Dana Robinson
d1d6a2187d
Remove code paths where long long < 8 bytes (#3098)
The C99 standard says that a long long is 8+ bytes. This change
removes a few parts of the code where we assume that a long long
could be less than that.
2023-06-12 12:18:23 -07:00
Dana Robinson
a1a9526b14
Address memory issues when copying empty enums (#3088)
When copying an empty enum type (including implicitly, as when an enum
is contained in a compound type), the library would allocate 0-size
blocks of memory and attempt to memcpy 0 bytes from NULL pointers, which
are undefined behavior. In debug mode, the library would raise an
assert in H5MM.

The library now avoid undefined memory operations when copying empty
enum types and a test that copies empty enums has been added.
2023-06-12 12:14:25 -07:00
Dana Robinson
7ecf1d09af
Convert H5F haddr_t macros to H5 (#3039)
Several macros for handling haddr_t values exist in H5Fprivate.h
and have H5F prefixes, even though they have nothing to do with
a particular file (e.g., H5F_addr_lt()).

These macros have been moved to H5private.h and renamed to have
an H5 prefix.

Affected macros:
    H5F_addr_overflow
    H5F_addr_defined
    H5F_addr_eq
    H5F_addr_ne
    H5F_addr_lt
    H5F_addr_le
    H5F_addr_gt
    H5F_addr_ge
    H5F_addr_cmp
    H5F_addr_overlap

H5F_addr_pow2 was unused and removed instead of converted.
2023-06-05 08:04:56 -07:00
Dana Robinson
81bc34ac4c
Only pass efc pointer to H5F__efc_open (#3026)
The H5F__efc_open() API call only needs the efc pointer, so there is
no need to pass the entire file struct in.
2023-05-30 08:33:52 -07:00
jhendersonHDF
79bb60c3f6
API test updates (#3018)
* Remove macros from api tests (#2929)
* Remove macros and undefined callbacks (#2959)
* Remove remaining macros from H5_api_tests_disabled.h (#2968)
* Put some vol capability checks in testpar tests and remove remaining warnings (#2995)
* API tests datatype generation cleanup
* Clean up API tests' random datatype generation and fix bug with enum
datatype generation
* Init parallel API tests with MPI_THREAD_MULTIPLE
* HDF5 API tests - Check VOL connector registration
* Determine whether a VOL connector failed to load before running API
tests
* Cleanup some usages of H5VL_CAP_FLAG_CREATION_ORDER in API tests
* Remove some now-unused macros from H5_api_tests_disabled.h
* Enable HDF5 API tests by default
* Implement CMake option to install HDF5 API tests
* Check for invalid AAPL from H5Acreate
* Enable building of VOL connectors alongside HDF5 in CMake
* Prepend CMake VOL URL option indices with 0s so they come in order
* Don't turn on API tests by default yet
* Document VOL connector FetchContent functionality
* Add release note for API test updates
* Only install testing library if API tests are installed
* Fix grammar
2023-05-26 13:29:02 -07:00
Dana Robinson
8dd7a016b1
Suppress vfd.c test warning (#3014) 2023-05-25 13:47:30 -07:00
Dana Robinson
68abd201b2
Fix missing/misplaced h5_reset calls (#3001)
Fixes failures when running tests after building with thread-safety
w/ code stacks on.

Fixes #2990
2023-05-23 13:47:24 -07:00
Dana Robinson
5c2e434dc6
Fix 'datatype' misspellings ('dataype') (#2984) 2023-05-19 09:05:23 -07:00
jhendersonHDF
d7cb8aca5b
Add test for HDstrcasestr macro (#2115) 2023-05-19 09:05:01 -07:00
Quincey Koziol
940bdafacb
Remove unnecessary fields from cache structs (#2951)
* Remove unnecessary 'magic' field from cache structs

Signed-off-by: Quincey Koziol <quincey@koziol.cc>

* Committing clang-format changes

---------

Signed-off-by: Quincey Koziol <quincey@koziol.cc>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-15 13:54:58 -05:00
jhendersonHDF
977884a575
Fix warning in cache_common.c (#2952) 2023-05-14 22:12:28 -05:00
Quincey Koziol
0d4a12d7cd
Move functions into more focused source code modules (#2936)
* Move functions into more focused source code modules, along with a small #
of directly secondary effects.  No actual changes to the contents of any
moved routines.

Signed-off-by: Quincey Koziol <quincey@koziol.cc>

* Committing clang-format changes

---------

Signed-off-by: Quincey Koziol <quincey@koziol.cc>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-12 14:52:11 -05:00
Quincey Koziol
1a89fa23fc
More code duplication reduction (#2930)
* Add failure value where it's missing from 1+ macros.  Clean up
whitespace / continuation characters ('\').  Made hash-table macros generic
for use in both the package header and test header.  Remove duplicated
copy & pasted macros (by hoisting difference into #ifdef'd macro).
Updated and re-flowed comments to read better.

Also clean up a few compiler warnings in production builds.

Signed-off-by: Quincey Koziol <quincey@koziol.cc>

* Committing clang-format changes

* Remove unused variable warning in H5C.c (#2844)

* Remove trailing /* NDEBUG */ comment from #endif's

* Committing clang-format changes

---------

Signed-off-by: Quincey Koziol <quincey@koziol.cc>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-09 15:19:18 -05:00
Allen Byrne
4b228ec6af
Fix CMake generator expression syntax (#2909) 2023-05-05 15:57:40 -05:00
Quincey Koziol
cc4d63b026
Fix mirror VFD test timeouts (#2915)
* Close & re-open socket when looping for timeouts

* Committing clang-format changes

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-05 15:34:17 -05:00
jhendersonHDF
a1a5d027a2
Minor tidying of API tests files (#2878)
* Minor tidying of API tests files

* Remove old API test configuration setting
2023-05-03 11:46:31 -05:00
Allen Byrne
571990d5c4
Changes to isolate API Test option files and use fetchcontent (#2880) 2023-05-03 11:45:16 -05:00
jhendersonHDF
f8a1b3ceec
Add initial version of HDF5 API tests (#2877) 2023-05-02 12:52:39 -07:00
Neil Fortner
62058276a9
Skip page buffer test for "no selection I/O cause" when using split or multi driver (#2866) 2023-05-01 14:31:09 -05:00
Dana Robinson
265494b5b9
Remove "the the" from comments and docs (#2865) 2023-05-01 09:06:39 -07:00
Neil Fortner
3236fb79ce
Implement selection I/O with type conversion (#2823)
Initial implementation of selection I/O with type conversion.  Allows
Parallel collective I/O with type conversion, as long as selection I/O
is enabled.
2023-04-28 16:58:25 -07:00
jhendersonHDF
bd7616cf98
Fix v1 object header gap bug in H5Ocopy (#2785) 2023-04-26 15:57:22 -07:00
jhendersonHDF
b7c8061505
Allow H5P_DEFAULT in H5Pget_vol_cap_flags and H5Pget_vol_id (#2807) 2023-04-25 10:04:17 -07:00
Dana Robinson
f909cb6c9b
H5Odtype.c decode cleanup (#2797)
* Adds bounds checking to H5Odtype.c
* Minor tidy of dtypes test
2023-04-25 10:03:12 -07:00
Dana Robinson
07c4360b4d
Sanitize the attribute object header msg code (#2749)
Adds:
* Bounds checks on buffer access
* Better memory cleanup
2023-04-19 08:21:25 -07:00
raylu-hdf
6e516abc29
Jira issue OESS-337: Create test for H5VLconnector_info_to_str (#2334)
* Jira issue OESS-337: Adding a test case for H5VLconnector_info_to_str, H5VLconnector_str_to_info, and H5VLconnector_free_info.  The test may need to change after the possible changes of the parameters of the API functions.
2023-04-18 10:19:45 -05:00
Allen Byrne
281071907b
Remove -Wunused-but-set-variable warnings in tests (#2661) 2023-04-11 14:07:14 -05:00
Quincey Koziol
3290889de3
Dead code removal (#2690)
* Correct concurrency bugs when running tests, along with a bugfix & small
warning cleanup.

* Committing clang-format changes

* Allow spaces (and tabs) in VOL connector info string from environment variable.

* Parse connector name from HDF5_PLUGIN_PATH environment variable better

* Correct H5VLquery_optional to use H5VL routine instead of H5I.  Also add an
error message to the failure return value from not finding a plugin.

* Play nice with existing plugin paths

* Use API routine to determine if native connector is terminal.

* Committing clang-format changes

* Make string size larger, to allow for connectors with longer names.

* Be more flexible about testing external pass through connectors, especially if
they have registered new optional operations.

* Dead code removal

* Committing clang-format changes

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: AWS ParallelCluster user <ec2-user@ip-10-0-0-65.us-east-2.compute.internal>
Co-authored-by: Koziol <qkoziol@88665a374c70.ant.amazon.com>
2023-04-11 09:30:02 -07:00
Quincey Koziol
49a71463a0
Comment cleanup (#2689)
* Clean up content and redundant logging in comments.
2023-04-11 09:41:32 -05:00
Dana Robinson
1ad030f669
Remove dead code hidden behind #ifdef LATER (#2686) 2023-04-10 11:39:46 -07:00