Commit Graph

38 Commits

Author SHA1 Message Date
Sean McBride
07df0d252c
Fixes the last of the -Wextra-semi-stmt warnings (#3326)
* Fixed extra semi warning by adjusting alternative macro definitions

* Find-replace H5E_END_TRY; -> H5E_END_TRY

* Made H5Epush_goto a do-while loop, fixed indentation

* Made GOTOERROR and ERRMSG do-while loops

* Made Hgoto_error and Hgoto_done  do-while loops

* Made vrfy_cint_type and vrfy_ctype  do-while loops

* Made TEST_TYPE_CONTIG and others do-while loops

* Removed extraneous semi-colons

* Committing clang-format changes

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-02 17:46:26 -05: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
Quincey Koziol
49a71463a0
Comment cleanup (#2689)
* Clean up content and redundant logging in comments.
2023-04-11 09:41:32 -05: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
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
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
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
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
b2d661b508 Clang-format of source files 2020-09-30 09:27:10 -05:00
Quincey Koziol
d5130bb573 Updated configure & CMake compiler flags for GCC 8.x, along with corresponding
changes to warnhist script (and some extra improvements for condensing C++
and Java warnings), and fixed a bunch of warnings.
2019-06-28 09:10:43 -05:00
Allen Byrne
41d541f1c2 More includes cleanup 2018-02-14 11:14:26 -06: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
83724bd787 [svn-r30113] Description:
Clean up warnings (from 2774 -> 1560, with my standard debug build)

Tested on:
    MacOSX/64 10.11.5 (amazon) w/serial, parallel & production
    (h5committest forthcoming)
2016-06-28 16:53:48 -05:00
Quincey Koziol
dd6c8994c0 [svn-r30017] Description:
Bring warning cleanusp in r29990, 29993, 29997, 29999, 30004 from
revise_chunks branch to trunk.

Tested on:
    MacOSX/64 10.11.5 (amazon) w/serial, parallel & production.
    (h5committest forthcoming)
2016-06-05 19:45:37 -05:00
Quincey Koziol
cc95ed32fd [svn-r29978] Description:
Bring r29914 from revise_chunks branch to trunk:

Banished -Wformat= warnings from the library, tools, and tests.

Tested on:
    MacOSX/64 10.11.5 (amazon) w/serial, parallel & production
    (h5committest forthcoming)
2016-05-30 02:03:37 -05:00
Dana Robinson
2e6100fb23 [svn-r27572] Removed VMS-specific code from the library.
The only remaining code consists of a few floating-point tests
that rely on pre-generated and checked-in VMS files. These have
been left alone, even though they will not be possible to
recreate, since testing VMS float behavior is still important.

Tested on: h5committest
2015-08-24 15:19:39 -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
Raymond Lu
df2fef9759 [svn-r18028] On Boeing's OpenVMS, the value of EXIT_FAILURE is 268435458.
(The test is in test_exit_definitions.)  Their document says
it's supposed to be 2.  I commented it out for further
consideration.

Tested 1.8 branch on jam - simple change.
2009-12-16 16:17:04 -05:00
Albert Cheng
451f5b1b11 [svn-r17635] Bug 1192:
Added EXIT_SUCEESS and EXIT_FAILURE macro values test.

Tested:
h5committested.
2009-10-12 23:04:21 -05:00
Allen Byrne
5d69e87ff0 [svn-r16489] Fixed bug #1459 by eliminating the macro long_long and replacing all instances with long long.
Tested:
   h5comittest
   fedora 10 x64
   Vista 32, VS2005, IVF101
   XP32, Cygwin
2009-02-18 15:02:05 -05:00
Albert Cheng
ed7d456e51 [svn-r13253] Updated all C and C++ style source code files with the THG copyright notice.
Tested platform:
Kagiso only since it is only a comment block change.  If it works in one
machine, it should work in all, I hope.  Still need to check the parallel
build on copper.
2007-02-07 09:56:24 -05:00
Quincey Koziol
6b45f5172c [svn-r11245] Purpose:
Code cleanup

Description:
    Trim trailing whitespace, which is making 'diff'ing the two branches
difficult.

Solution:
    Ran this script in each directory:

foreach f (*.[ch] *.cpp)
    sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f
end


Platforms tested:
    FreeBSD 4.11 (sleipnir)
    Too minor to require h5committest
2005-08-13 15:53:35 -05:00
Albert Cheng
4d65048d2d [svn-r11193] Purpose:
fixed typo for uint_fast16_t verification.

Tested in Red storm.
2005-08-03 15:35:54 -05:00
Quincey Koziol
34bd25f361 [svn-r11144] Purpose:
New port

Description:
    Elena asked me to check in her NEC SX-6 work, so here it is! :-)

Platforms tested:
    FreeBSD 4.11 (sleipnir)
    NEC SX-6 (by Elena)
2005-07-22 20:55:12 -05:00
Albert Cheng
06a81051f0 [svn-r9450] Purpose:
"Improvement"?

Description:
Long double is a standard C89 type.  Promoted it from
a conditional tested type to an assumed supported type.

Platforms tested:
H5committested.

Misc. update:
2004-10-22 16:11:16 -05:00
Albert Cheng
1de960855f [svn-r9427] Purpose:
Bug fix.

Description:
AIX defines different sizes of the signed and unsigned int_fast8_t.
Changed the code to check each type individually and do not verify
they must be the same size.

Platforms tested:
Tested in copper only since the change is trivial.

Misc. update:
2004-10-14 16:25:59 -05:00
Albert Cheng
7d1bf17b3d [svn-r9419] Bug fix.
tconfig.c:
    Verified only the unsigned int types and did not detect inconsistencies
    on signed type such as int_fast16_t.
    Changed code to verify both signed and unsigned int types wherever
    applicable.  It also depends on signed and unsigned forms of an
    int type must be of the same sizes.

testhdf5.c:
    Shorten the configure test name to 'config'--easier to type.

Tested on LLNL Frost and Snow.  Will test in Copper after commit.
2004-10-14 14:12:44 -05:00
Quincey Koziol
987f5d5e4d [svn-r8048] Purpose:
Code cleanup & reorganization

Description:
    Move further in the testing framework cleanup, eliminating all the
global variables (moving them into testframe.c as static variables) from the
testing framework code and moving it into the libh5test.a.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w & w/o thread-safety, c++ & parallel
    h5committested
2004-01-09 20:41:13 -05:00
Quincey Koziol
0497e80b50 [svn-r7829] Purpose:
Bug fix & code cleanup

Description:
    Allowing the library to call malloc with a size of 0 bytes causes problems
for some users, so we check for allocations of 0 bytes and disallow them now.

    Cleaned up some code which could call malloc with 0 size.

    Changed some code calling HDmalloc directly to call H5MM_malloc(), which
allows us to check for 0 sized allocations.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-11-08 10:32:53 -05:00
Quincey Koziol
8f205256f2 [svn-r6939] Purpose:
Code cleanup

Description:
    Free malloc'ed buffer of 0 bytes when H5_MALLOC_WORKS is defined, to make
purify happier.

Platforms tested:
    h5committestted (although Fortran tests failed for some reason)
2003-05-31 11:18:06 -05:00
Bill Wendling
44022e598c [svn-r6538] Purpose:
Update

Description:
    Updated the Copyright statement

Platforms tested:
    Linux (This change is only in the comments, so I just check that the
    modules still compile)

Misc. update:
2003-03-31 12:59:04 -05:00
Albert Cheng
73683e4380 [svn-r5278] Purpose:
Migrate from configure macros of XYZ_ABC to H5_XYZ_ABC
Description:
    configure generates many macros definitions on the fly and
    were stored in src/H5config.h which is included by H5public.h.
    But other software that uses hdf5 may also run their own configure.
    There can be a clash in macro name space.  We decided awhile ago
    to prepend all generated macros with "H5_" to avoid conflicts.
    The process has started and this commit completes it (at least attempt
    to).
Solution:
    Many macros symbols (e.g. SIZEOF_xxx and HAVE_xxx were changed to
    H5_SIZEOF_xxx and H5_HAVE_xxx).  Then H5private.h no longer includes
    H5config.h.  This cuts H5config.h away from HDF5 source code.
Pending issues:
    The module of fortran and pablo are to be resolved in a different
    commit.
Platforms tested:
    eirene (parallel), arabica (solaris 7 --enable-fortran, --enable-cxx)
2002-04-28 03:34:17 -05:00
Quincey Koziol
ef9c40754b [svn-r5200] Purpose:
Code Cleanup

Description:
    Clean up compiler warnings from the last bunch of checkins

Platforms tested:
    FreeBSD 4.5 (sleipnir)
2002-04-18 09:05:38 -05:00
Albert Cheng
adae346075 [svn-r5182] Purpose:
Feature
Description:
     Added test to verify H5_MALLOC_WORKS (malloc zero byte) macro
Platforms tested:
    Eirene
2002-04-13 20:15:45 -05:00
Quincey Koziol
69575231ef [svn-r4614] Purpose:
Code cleanup
Description:
    Corrected header files needed.
Platforms tested:
    FreeBSD 4.4 (hawkwind)
2001-11-20 13:47:15 -05:00
MuQun Yang
0ecc4709e9 [svn-r4524]
Purpose:
    refix tconfig.c
Description:
    Follow Robb's reminder, long_long is used to define __int64 in windows and long long for other platforms at H5private.h.
Solution:
     just change vrfy_ctype(long long....) into vrfy(long_long,.....) in the tconfig.c. Delete the previous
macro.
Platforms tested:
    windows 2000, linux
2001-10-05 13:39:36 -05:00
MuQun Yang
2f90a7ae41 [svn-r4522]
Purpose:
 bug fixed
Description:
    Windows doesn't recognize long long. Instead it uses __int64. So add a macro
like
#ifdef HAVE____int64 for windows-like platforms.
Solution:
 see above
Platforms tested:
eirene
2001-10-05 11:43:32 -05:00
Albert Cheng
2612814874 [svn-r4474] Purpose:
New feature.
Description:
    Added a test to verify the correctness of information provided by
    configure in H5config.h.  Some information, such as SIZEOF some
    types can be hardcoded by config/<machine>.  This test verified
    the information is indeed correct.
    Currenly, only size of C language types are verified.
Platforms tested:
    Eirene, regular, arabica.
2001-09-26 00:37:15 -05:00