Commit Graph

98 Commits

Author SHA1 Message Date
David Young
1fb3743f04
Fix JNI bug, fix warnings noticed in MSVC CI, be modern & portable (#1480) 2022-03-10 13:54:20 -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
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
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
a7a013782f
Various clang tidy warning fixes (#448)
* Fixed clang-tidy bugprone-reserved-identifier warnings

* Fixed clang-tidy bugprone-assert-side-effect warnings

* Fixed clang-tidy bugprone-copy-constructor-init warning

* Fixed clang-tidy readability-redundant-preprocessor warning

For error_test.c the removed code was already dead, because it was in the else of an `#if H5_USE_16_API` block.

Based on H5Location.h, I think p_get_ref_obj_type was meant to be in `#ifndef DOXYGEN_SHOULD_SKIP_THIS` and an `#endif` was missing.  Similarly, in the header, getObjTypeByIdx is only in H5_NO_DEPRECATED_SYMBOLS, not DOXYGEN_SHOULD_SKIP_THIS.

* Fixed clang-tidy readability-redundant-string-init warnings

* Fixed some clang-tidy performance-type-promotion-in-math-fn warnings

* Fixed clang-tidy performance-unnecessary-value-param warnings

* Reformat source with clang v10.0.1.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-10 12:41:34 -06:00
Larry Knox
4819f89d3f
Update license url (#332)
* Modify temporary rpath for testing in java example scripts.

* Update URL in source file Copyright headers for web copy of COPYING
file - src and test directories.
2021-02-17 08:52:04 -06:00
Dana Robinson
ca3659a014 HD prefix updates in src/ and test/
Adds missing HD prefixes to API calls in src and test.

Adds some extra processing to bin/checkposix to keep the noise
levels down when running the script (not comprehensive).
2020-10-23 17:13:05 -07:00
Allen Byrne
b2d661b508 Clang-format of source files 2020-09-30 09:27:10 -05:00
Allen Byrne
274cd0ba1d Pre-format fixes for warnings as errors 2020-09-29 10:24:49 -05:00
Dana Robinson
5ce2a17804 Removes staff email addresses from the repository
Removes redundant C library headers from hl library
2020-08-06 17:58:07 -07:00
Quincey Koziol
9e5dbf6906 Trim trailing whitespace 2020-04-20 18:12:00 -05:00
Jacob Smith
cab37f6314 Move function-scope macro definition to file-scope. 2019-09-30 13:57:09 -05:00
Jacob Smith
541f50616f Refactor external file addition loop to static function. 2019-09-29 18:52:55 -05:00
Jacob Smith
59aa3afade fix declaring variable in for statement 2019-09-28 16:05:51 -05:00
Jacob Smith
35a9e9c50f Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~jake.smith/hdf5 into bugfix/repack_external_storage 2019-09-23 17:23:02 -05:00
Jacob Smith
1070468dac Change print calls to HD-wrapped.
Minor formatting tweaks (inc. regressions and in-file style-matching).
2019-09-23 16:25:25 -05:00
Allen Byrne
64e6665b54 Add HD prefix to tests 2019-08-15 16:46:15 -05:00
Larry Knox
0c374d65c6 Fix conflicting types for reset_raw_data_files() parameter in external_common.c changed from int to hbool_t.
Change 0 and 1 to FALSE and TRUE in calls to reset_raw_data_files().
2019-08-01 10:18:45 -05:00
Jacob Smith
c7f8cb011d Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~jake.smith/hdf5 into bugfix/repack_external_storage 2019-07-22 17:09:54 -05:00
Jacob Smith
7ff3a63d5f Minor formatting adjustments. 2019-07-22 16:55:37 -05:00
Quincey Koziol
3b594992d6 Add support for GCC9, update warnhist script, and clean up warnings. 2019-07-02 23:43:45 -05:00
Jacob Smith
132efb2b69 Some minor reformatting.
Replace tabs with spaces.
2019-05-24 16:59:14 -05:00
Songyu Lu
2c47094d40 Changing file names to avoid possible conflicts during parallel test. 2019-04-22 10:23:38 -05:00
Songyu Lu
04d07d967a Left out this file in previous commit. 2019-04-09 17:40:24 -05:00
Songyu Lu
50d9a397ab This commit basically has the following changes:
1. restored the datatype, dataspace, and LCPL of the dataset for VOL connector back to the properties.
2. splitted external.c and vds.c because they called HDsetenv in the program, instead using shell scripts to set the environment variables.
3. changed H5CX_get_vds_prefix and H5CX_get_ext_file_prefix to use H5P_peek instead of H5P_get.
2019-04-04 11:03:05 -05:00
Dana Robinson
734aebc395 Rework of the POSIX file open permissions and macros to clean up
HDopen() calls.

Also fixed a minor const warning in the core VFD.
2017-04-28 18:13:22 -04:00
Dana Robinson
d3b664b6a7 Changed the Windows POSIX open() file permissions to be correct
according to MSDN. Partial fix for HDFFV-9630.
2017-04-28 08:11:29 -07:00
Larry Knox
89fbe00dec Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to hdf5_1_10
* commit '54957d37f5aa73912763dbb6e308555e863c43f4':
  Commit copyright header change for src/H5PLpkg.c which was added after running script to make changes.
  Add new files in release_docs to MANIFEST. Cimmit changes to Makefile.in(s) and H5PL.c that resulted from running autogen.sh.
  Merge pull request #407 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1
  Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
2017-04-25 16:05:36 -05:00
Dana Robinson
57b7130acf [svn-r29698] Switched true and false to TRUE and FALSE in a function in
test/external.c.

Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1
           autotools serial (external test only)
2016-04-14 16:26:41 -05:00
Dana Robinson
0dd0ffd5c1 [svn-r29421] Fix for HDFFV-9516.
Corrects a problem where H5Dget_access_plist() returns a dapl that
does not contain all dapl fields.

Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1
           autotools serial
2016-03-15 12:43:34 -05:00
Dana Robinson
19a8216bd5 [svn-r29182] Re-commit of HDFFV-8740 fix, which adds the ability to configure
external dataset storage path behavior.

This check-in fixes a bug in the original check-in where the
external path stored in the file struct was not copied on reopen
causing subsequent dataset operations to fail.

Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
           autotools serial w/ fortran and C++
           autotools parallel (MPICH 3.1.4) w/ fortran
2016-02-22 16:40:03 -05:00
Dana Robinson
944e932662 [svn-r29119] Converted HDoff_t to off_t in test/external.c.
Fixes Windows errors.

Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1
           64-bit Windows 10 w/ VS2015
2016-02-15 14:22:03 -05:00
Dana Robinson
5655e5a91a [svn-r29084] Revert of:
r29069 and 72 (gheap cleanup)

r29041 and 43 (HDFFV-8740 external storage)

These cause problems in the daily tests. They will be
re-introduced when their respective problems have been
addressed.

Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
           autotools serial (check-vfd) w/ Fortran and C++
           autotools parallel w/ Fortran
           CMake serial
2016-02-10 23:40:10 -05:00
Dana Robinson
57da3b7db6 [svn-r29043] Fixes to make relative external storage work on Windows. Part of HDFFV-8740.
- Fixed typo in Wsetenv().
- Changed HDoff_t back to off_t in test/external.c. The function signature is off_t so the types must match or you can get conversion errors.

Tested on 64-bit Windows 10 w/ VS 2015
2016-02-04 11:06:38 -05:00
Dana Robinson
c746447b0d [svn-r29041] Patch from Steffen Kiess that allows a relative path to be specified
for external dataset files set via H5Pset_external().

Resolves HDFFV-8740

Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
           autotools serial
2016-02-04 10:35:17 -05:00
Dana Robinson
e9139733f2 [svn-r29035] Removed external links test from external storage test.
This test is duplicated more comprehensively in the links.c file so
there is no need to copy it over.

Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
           serial autotools
2016-02-02 09:36:28 -05:00
Dana Robinson
2b2b95814e [svn-r29034] Update the external test to use the default and latest file format.
Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
           serial autotools
2016-02-02 09:17:31 -05:00
Dana Robinson
e25aa5f97d [svn-r29030] Cleanup of test/externals before merging user patch.
Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
           serial autotools
2016-02-02 05:30:48 -05:00
Quincey Koziol
33ea1ada24 [svn-r25496] Description:
Merge 64-bit ID changes from branch to trunk.  (Plus a few minor cleanups
that aren't on the branch)

Tested on:
    Mac OSX/64 10.9.4 (amazon) w/C++ & FORTRAN
    (h5committested on branch already for a week)
2014-07-30 15:55:14 -05:00
Quincey Koziol
a07c8f9247 [svn-r22287] Description:
Clean up more FUNC_ENTER/FUNC_LEAVE macros and move H5D & H5T code toward
the final design (as exemplified by the H5EA & H5FA code).

Tested on:
    Mac OSX/64 10.7.3 (amazon) w/debug & parallel
2012-04-16 16:20:26 -05:00
Neil Fortner
7610dd20af [svn-r20529] Purpose: Add testing for bug 1864
Description:
Added internal tesitng routines to traverse a file and verify that symbol table
information is *always* cached, whenever possible.  Added this check to the end
of many tests to check all the test files, right before the call to h5_cleanup.

Tested: jam, amani, heiwa (h5committest)
2011-04-15 17:05:23 -05:00
Vailin Choi
4810a3d319 [svn-r19813] 1. Correct mistake for previous checkin rev #19781:
file name listed for DISTCLEANFILES should be testlinks_env.sh
2. Add comments to test_4() in test/external.c about the link name "/ link".
3. Fix memory leak as reported by valgrind in src/H5Lexternal.c: 
   free memory pointed to by tmp_env_prefix for HDF5_EXT_PREFIX case.
2010-11-17 17:11:02 -05:00
Quincey Koziol
1809f040c9 [svn-r18419] Description:
Clean up srcdir querying code more, extracting it into single header file,
to avoid compiler warnings.

Tested on:
    Mac OS X/32 10.6.2 (amazon) w/debug & prod
    Linux/32 2.6 (jam)
2010-03-18 07:23:04 -05:00
Quincey Koziol
fd547cd11f [svn-r18413] Description:
Unify srcdir handling for test executables and allow them to use the srcdir
setting from configure time without requiring the 'srcdir' environment variable
be set (although you still can, to override the built in setting).  Attempted
to get this right for Windows builds also.

    Also add dependency between src/H5Tinit.c and src/libhdf5.settings, so
that the test/testcheck_version.sh script works correctly.

Tested on:
    Linux/32 2.6 (jam)
    Mac OS X/32 10.6.2 (amazon)
2010-03-17 16:38:20 -05:00
Quincey Koziol
fd70b2afa8 [svn-r18197] Description:
Trim trailing whitespace from source code files with this command:

find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.f90" \) -print |xargs -n 1 sed -i "" 's/[[:blank:]]*$//'

Tested on:
    None - eyeballed only
2010-01-29 23:29:13 -05:00
Quincey Koziol
fb1059e507 [svn-r17953] Description:
Bring Coverity changes into the trunk:

r17877:
Error 266: Uninitialized memspace set to -1. Changed malloc and free to HDmalloc and HDfree. Removed unused dtype var.

r17878:
Error 265: Uninitialized mem_space set to -1. Changed malloc and free to HDmalloc and HDfree. 
Error 267: Uninitialized smspace set to -1. Changed malloc and free to HDmalloc and HDfree.

r17879:
Error 242: Uninitialized aid set to -1. 
Error 243: Uninitialized sid set to -1. 
Uninitialized tid set to -1 for consistency

r17880:
Error 242: reinitialized aid to -1 after close to be ready for reuse. 
Error 243: reinitialized sid to -1 after close to be ready for reuse. 
reinitialized tid to -1 for consistency after close to be ready for reuse.

r17881:
use valgrind to check there is a memory leak. The fix is to free ptrstr in line 5838 at xml_dump_group() of h5dump.c after it is used. run the valgrind after the fix, no memory leak for that part of the code.

r17882:
Fix Coverity items 256 and 269.

r17883:
Error 222-230: initialized hid_t vars to -1 after close to be ready for reuse. 
Also added H5Tclose for tid in gent_bigdims

r17884:
Bug fix (Coverity run2, view 23, dead code)
(this is pair-program done by Albert, Elena and Larry).

Confirmed and fixed the deadcode in hyperslab read branch of function
diff_datasetid.
(Discovered other bad code that diff_datasetid() should be recoded.  
Bug 1693 is entered for this.)

r17906:
Fix Coverity item 260.

r17907:
262: Initialized hid_t's dtype, dtype_tmp and file to -1. Initialized H5T_t * dt to NULL.

r17908:
Fix Coverity item 261.

r17909:
Fix Coverity item 248.

r17910:
Revise fix for Coverity item 248.

r17911:
Resolved coverity issues #s 263, 162, 163, 164. All issues in dsets.c. Initialized fid and did hid_t's. filter_corrupt function was returning in the middle of an if statement, bypassing free calls. Updated error handling to free buffers and hid_t's appropriately.

r17912:
(done by Larry and Albert)
Cleanup Coverity view warnings (#231-241) about
using uninitialized variables.  Initialized all
of them.

r17913:
Resolved issue 251 and 264. Initialized tid2 to -1 and initialized buffers that were freed in case of an error.

r17914:
Resolved coverity issues 66, 220, and 221: 

66: Negative Return assignment ignored

220,221: Initialized hid_t's.

r17915:
Fix Coverity item 247.

r17916:
Fix Coverity item 246.

r17917:
Fix Coverity item 245.

r17918:
Fix Coverity item 244.

r17919:
Coverity Issue #84: Moved asserts in H5T_cmp to the top of the function, and converted them to HDassert. Coverity complaining about using potentially NULL pointer without checking it. Want to see if Coverity will accept Assertions as acceptable checking before using the value. 

Tested on:
    FreeBSD/32 6.3 (duty) in debug mode
    FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
    Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
        w/C++ & FORTRAN, w/threadsafe, in debug mode
    Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x,
        w/C++ & FORTRAN, in production mode
    Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
        w/szip filter, in production mode
    Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
        in production mode
    Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
    Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
    Mac OS X/32 10.6.2 (amazon) in debug mode
    Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
        in production mode
2009-12-03 14:11:29 -05:00
Pedro Vicente Nunes
629cc339eb [svn-r16144] Removed the check of H5Dset_extent for the space to be chunked, since external datasets can be extended
Tested: windows, linux
2008-12-01 15:38:02 -05:00
Pedro Vicente Nunes
e004bd48f2 [svn-r16142] Added a check to H5Dset_extent for the space to be chunked, exit with error otherwise
A call to H5Dset_extent in the external test was removed

Tested: windows, linux
2008-12-01 13:46:07 -05:00
Quincey Koziol
0e51a4244e [svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.

	Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.

Tested on:
        Mac OS X/32 10.5.5 (amazon) in debug mode
        Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
                                in production mode
        FreeBSD/32 6.3 (duty) in debug mode
        FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
                                w/C++ & FORTRAN, in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                                w/szip filter, in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                                in production mode
        Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
        Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-14 20:46:34 -05:00