Commit Graph

91 Commits

Author SHA1 Message Date
Dana Robinson
44a00ef876
Strip HD prefix from string/char C API calls (#3540)
* Strip HD prefix from string/char C API calls

* HD(f)(put|get)(s|c)
* HDstr*
* HDv*printf
* HD(s)(print|scan)f
* HDperror

But NOT:

* HDstrcase*
* HDvasprintf
* HDstrtok_r
* HDstrndup

As those are not C99 and have portability work-around
implementations. They will be handled later.

* Fix th5_system.c screwup
2023-09-15 15:13:18 -07:00
Scot Breitenfeld
117d579c32
Consistent initialization of hid_t in the tests (#3521) 2023-09-08 18:06:23 -05:00
Dana Robinson
9208697960
Convert hbool_t --> bool in test (#3494) 2023-09-05 13:11:52 -07:00
Dana Robinson
39e6bf48c9
Remove HD from HDmem* calls (#3211) 2023-06-29 12:33:46 -07:00
Dana Robinson
fd933f30b1
Remove programmer/date from comments (#3210)
* Removes Programmer: and Date: fields
* Fixes a few Modifications: fields leftover from previous work
2023-06-29 12:13:29 -07:00
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
aebac33a1f
Remove HD from memory allocate/free calls (#3195)
* HDcalloc
* HDfree
* HDmalloc
* HDrealloc
2023-06-28 15:48:12 -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
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
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
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
Larry Knox
11dfa25910
Update copyright headers (#2184)
* Updated source file copyright headers to remove "Copyright by the Board of Trustees
of the University of Illinois", which is kept in the top-level COPYING file.
2022-11-01 16:02:27 -05:00
Allen Byrne
ae414872f5
Develop clang 13 format (#1933)
* Update format source to clang 13

* More format changes
2022-07-26 14:45:46 -07:00
Dana Robinson
838d050a63
h5test.h testing macros get enclosed in do..while loops (#1721)
* h5test.h testing macros get enclosed in do..while loops

* Adds missed macro in hl C++ code

* Fixes macro in Windows code
2022-05-04 08:49:01 -07: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
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
Allen Byrne
6db183590f
develop revert source to clang-format version 11 (#293)
* 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
2021-01-29 06:55:18 -06:00
Quincey Koziol
adf7b1d4cf
Add flag to H5CX_pop that allow setting the properties to return to application to be skipped. (#134) 2020-12-01 10:15:34 -06:00
Quincey Koziol
5ff09ae971
Basic alignment with async branch (#115)
* Basic alignment with async branch - trivial changes to reduce clutter in overall diff.

* Update minor error code to reflect change within library

* Update the error output to match library
2020-11-23 10:18:26 -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
David Young
d85cd245d2 Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-09-03 16:13:47 -05:00
Quincey Koziol
a2340cec3b Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01 2020-08-07 10:06:34 -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
8fe3cece3c Switch H5VM inline routines back to single underscope and put a comment in their header about this naming 2020-08-06 17:46:40 -05:00
Quincey Koziol
07e4ef9da4 Clean up private / package / static namespace issues (function naming, which
header file, FUNC_ENTER / LEAVE, etc).  Removed remaining personal email
addresses from library source code (still needs cleaned from other directories).
Misc. warning, style, and whitespace cleanup.
2020-08-06 15:56:04 -05:00
David Young
307cb5da48 Squash my changes on branch fprintf-experiment into one commit for
reapplication to my new warnings branch, `warnings-again`.  These
changes are included:

commit 915551b7bf64e777dd2007386ec77b1d117770da
Merge: 63858c2 a8892bb
Author: David Young <dyoung@hdfgroup.org>
Date:   Mon Nov 25 17:39:49 2019 -0600

    Merge remote-tracking branch 'hdf5/develop' into fprintf-experiment

commit a8892bb42d
Merge: 5c911d8 f907b51
Author: David Young <dyoung@hdfgroup.org>
Date:   Mon Nov 25 17:33:54 2019 -0600

    Merge pull request #2055 in HDFFV/hdf5 from ~DYOUNG/vchoi_fork:add-werror-and-squash-some to develop

    * commit 'f907b511d06612dafc7814a7c30f2f3d2b76d52b':
      Oops, remove more C99 designated initializers for VS 2010 compatibility.

commit 63858c22e168acaec0af8ced6641f26102cc6bb0
Merge: 20ae787 5c911d8
Author: David Young <dyoung@hdfgroup.org>
Date:   Mon Nov 25 17:04:42 2019 -0600

    Merge remote-tracking branch 'hdf5/develop' into fprintf-experiment

commit 5c911d8baf
Merge: b8a5671 62208b0
Author: David Young <dyoung@hdfgroup.org>
Date:   Mon Nov 25 16:58:27 2019 -0600

    Merge pull request #2030 in HDFFV/hdf5 from ~DYOUNG/vchoi_fork:add-werror-and-squash-some to develop

    * commit '62208b056a09c01855fbac7f75146be58ad6bfe5': (44 commits)
      Add an #include to get a function declaration.
      Don't use C99 designated initializers, they're not compatible with Visual Studio 2010.
      Quiet some more maybe-uninitialized warnings---each is a false positive, *sigh*.  This is more code that may not compile with VS2010, *sigh sigh*.
      Always warn on maybe-uninitialized.  -Wincompatible-pointer-types was not available until GCC 5, so enable it only if that's the GCC version we're using.
      Only promote maybe-uninitialized warnings to errors on GCC 8.  Even on GCC 8, there may be false positives at low optimization levels?  I need to check.
      Only use -Werror=cast-function-type with GCC 8 and later.
      Put all of the -W options back into the order I found them in so that it's easier to compare old and new config/gnu-flags.
      Add new source files to CMakeLists.txt.
      Mention the -Werror= flags in libhdf5.settings.in.
      free -> HDfree
      Promote decleration-after-statement warnings to errors.
      Quiet decleration-after-statement warnings.
      Move a statement under some declarations since some vintages of Visual Studio don't like declarations after statements.
      Document H5D__chunk_mem_xfree_wrapper().
      Undo accidental test deletion.
      Oops, delete a debug printf that snuck in here.
      Undo my changes to the HD macros, hadn't really intended those to be on this branch....
      Make errors of some more warnings.  Move disabled warnings to DEVELOPER_WARNING_CFLAGS.  Put just one warning option on a line, and sort some of the options.
      Cast to the parameter type, H5VL_token_t *, instead of to unsigned char *.
      Change hdset_reg_ref_t and H5R_ref_t from arrays of unsigned char to structs containing those arrays.  Encapsulating the arrays in this way makes it easier to write and think about pointers to these types, casts to/from these types, etc.
      ...

commit 20ae7877e33931b95e8c3502b027d6c3fe94a11f
Merge: 46f8c61 edd5297
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 15:34:09 2019 -0600

    Merge remote-tracking branch 'origin/add-werror-and-squash-some' into fprintf-experiment

commit 46f8c613d5117a8be5bc8385a072daa0b4262f06
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 15:29:00 2019 -0600

    GCC really wants us to use `ll` to format `long long`, so try to make that work
    before any other format modifier.  Seems like we're not compiling the autoconf
    test program with -Werror=format ?  Probably should.

commit eee35b8ef3759c391327cd48a9b3c56b6f8abc99
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 15:28:05 2019 -0600

    It's hard to know just how wide an HDoff_t will be, and I don't think POSIX or
    C standards provide a PRI macro for it, so cast to intmax_t and format using
    PRIdMAX.

commit 86eab12df7a89b546a38e99f8178dd2adbcb3433
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 15:26:25 2019 -0600

    URemove some casts.se the right format string for the argument.  Here and there
    stop casting a printf argument.

commit f722f7cbecbaa99449941484b014426f62f1bed5
Merge: 58e3743 6d5ec83
Author: David Young <dyoung@hdfgroup.org>
Date:   Fri Nov 22 14:44:16 2019 -0600

    Merge branch 'add-werror-and-squash-some' into fprintf-experiment

commit 58e3743b7faa9836606ee91798fe80dfc0040da7
Author: David Young <dyoung@hdfgroup.org>
Date:   Wed Nov 20 21:07:21 2019 -0600

    Remove custom HDfprintf implementation, using the standard library's,
    instead.  Take a swipe at repairing fprintf format strings, mainly
    replacing "%Hu" with "%" PRIuHSIZE, "%a" with "%" PRIuHADDR, "%Zu" with
    "%zu".

    Here and there remove an awkward cast of a printf argument to `long
    long` and use PRI[doux]8, PRI[doux]32, or PRI[doux]64, instead.

    Change occurrences of "%t" to "%s" and perform a suitable change of
    argument, `cond` -> `cond ? "TRUE" : "FALSE"`.

    Some occurrences of %Hu, %a, and %t remain, they just weren't flagged by
    the compiler because of #ifdef'age.

commit d4366909293fa970c23512ac80e5d865d76cddbf
Author: David Young <dyoung@hdfgroup.org>
Date:   Wed Nov 20 20:54:32 2019 -0600

    Promote format-string warnigns to errors.
2020-07-07 10:49:55 -05:00
David Young
3e93aa9514 So that I can use PASSED(); anywhere a statement can go, #define PASSED() with
a do-while wrapper.
2020-02-28 16:51:55 -06:00
Dana Robinson
1ad02a4459 Yanked -Wc++-compat from the flags used to build the C library in both
the Autotools and CMake.
2019-12-04 00:49:52 -08:00
Allen Byrne
64e6665b54 Add HD prefix to tests 2019-08-15 16:46:15 -05:00
Allen Byrne
44e2ddac97 Merge cleanup mostly whitespace 2019-07-30 12:39:20 -05:00
Dana Robinson
e962df1591 VOL FEATURE 2018-10-10 08:10:15 -07:00
Dana Robinson
67a126c7ba Normalization with vol_integration (test code and H5Xtest.c) 2018-09-20 10:40:51 -07:00
Quincey Koziol
d812c6fe60 Cleanup API context function usage. 2018-03-18 22:51:19 -05:00
Quincey Koziol
4a17aff408 Add API context interface and use it throughout the library. 2018-03-15 16:54:30 -05: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
Quincey Koziol
349f41d974 Switch list lengths to unsigned integers (to align better w/cache image merge) 2017-01-27 20:35:14 -08:00
Quincey Koziol
3b0c2b24da Bring over support for retrying metadata cache entry loads, along with all the
supporting metadata cache callback changes, etc.
2016-11-20 04:24:57 -08:00
Quincey Koziol
eba0ff43c9 Remove 'clear' callback from metadata cache client interface, using the
new 'entry cleaned' notify action innstead.
2016-11-17 17:48:21 -08:00
Quincey Koziol
be27e1ad79 Remove explicit support within the metadata cache for tracked compressed
entries, they are now completely handled in the clients.
2016-11-17 12:58:04 -08:00
Quincey Koziol
80ac4343cd Align w/minor cleanups in revise_chunks branch. 2016-11-11 23:14:58 -08:00
Dana Robinson
9333a2e39c [svn-r29548] Minor normalization w/ trunk in preparation for big merge.
Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1
           autotools serial
           autotools parallel (MPICH 3.1.4)
2016-03-23 22:58:43 -05:00
Mohamad Chaarawi
63c90e5c67 [svn-r29081] - merge in the phdf5_metadata_opt/ branch with the collective metadata optimizations.
- rename H5AC_dxpl_id to H5AC_ind_read_dxpl_id and update all usage in the library

tested on bb-8 with parallel and serial.
2016-02-10 15:48:34 -05:00
Mohamad Chaarawi
48bebcc39e [svn-r29057] added dxpl type checking when debug mode is enabled (H5_DEBUG_BUILD)
tested on bb-8 with Serial and Parallel, debug and production builds.
2016-02-07 10:37:33 -05:00
Quincey Koziol
9ceca0f89a [svn-r28710] Description:
Bring r28708 from revise_chunks branch:

    Fix earray, farray and btree2 use of incorrect file pointer when two files
are opened and used to access the data structure.  Misc. minor code cleanups
as well.

Tested on:
    MacOSX/64 10.11.2 (amazon) w/serial & parallel
    h5committest forthcoming
2015-12-19 09:42:15 -05:00
Quincey Koziol
1023374492 [svn-r27768] Description:
Complete revamp of package initialization/shutdown mechanism in the library.
Each package now has a single init/term routine.

    This new way should avoid packages being re-initialized during library
shutdown and is also be _much_ more proactive about giving feedback for
resource leaks internal to the library.

    Introduces a new "module" header file for packages in the library
(e.g src/H5Fmodule.h) which sets up some necessary package configuration macros
for the FUNC_ENTER/LEAVE macros.  (The VFL drivers have their own slightly
modified version of this header, src/H5FDdrvr_module.h)

    Also cleaned up a bunch of resources leaks all across the library and tests,
along with addressing many warnings, as I encountered them.

Tested on:
    MacOSX/64 10.10.5 (amazon) w/serial & parallel
    Linux/64 3.10.x (kituo) w/serial & parallel
    Linux/64 2.6.x (ostrich) w/serial
2015-09-13 22:58:59 -05:00