Commit Graph

91 Commits

Author SHA1 Message Date
Allen Byrne
b2d661b508 Clang-format of source files 2020-09-30 09:27:10 -05:00
David Young
08034972bc Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-09-27 15:03:44 -05:00
Allen Byrne
a117ac6cae Fix comment formatting due to tabs conversion 2020-09-24 09:57:21 -05:00
Allen Byrne
d8d17d2328 File changes to affect formatting 2020-09-04 16:51:30 -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
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
Quincey Koziol
9e5dbf6906 Trim trailing whitespace 2020-04-20 18:12:00 -05:00
David Young
fa1b2f6ef3 Reduce differences between my -Werror branch and develop:
Rename index -> idx, fileno -> fnumber, fileno -> fno to avoid GCC
shadowed declaration warnings about index(3).

Convert #pragma GCC diagnostic push/pop/ignored to the HDF5 library's
H5_GCC_DIAG_OFF()/H5_GCC_DIAG_ON() macros.
2020-01-28 20:35:28 -06:00
Quincey Koziol
db7c43d375 Updates to warnhist script, along with a few cleanups, and add some comments
to warning cleanups that are a bit obscure.
2019-07-09 22:15:36 -05:00
Dana Robinson
536a32c59b C and POSIX call cleanup 2019-01-10 17:51:42 -08: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
Quincey Koziol
4af66b09e0 [svn-r30219] Description:
More warning cleaups: down to 770 warnings (from ~940) in 134 files (from
148), with 28 unique kinds of warnings (from 31).

Tested on:
    MacOSX/64 10.11.5 (amazon) w/serial & parallel
    (h5committest forthcoming)
2016-07-22 17:43:18 -05:00
Dana Robinson
308426c6e3 [svn-r28568] Normalization of test/big.c with revise_chunks.
Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
           serial only
2015-12-10 21:05:50 -05:00
Quincey Koziol
af25c747ad [svn-r27851] Description:
Normalization changes that wouldn't otherwise be necessary if the VDS branch
wasn't coming in shortly.

Tested on:
    MacOSX/64 10.10.5 (amazon) w/serial & parallel
    (h5committest forthcoming)
2015-09-21 21:11:54 -05:00
Dana Robinson
2385b2b0ad [svn-r27800] Minor warning fixes in the library tests.
Tested on: jam (too minor for h5committest)
2015-09-16 08:54:23 -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
Dana Robinson
b7a4e1a44e [svn-r24358] Changed the big test so that it runs using the h5_fileaccess() fapl.
The previous behavior was to execute a sec2, stdio, and family
test everytime it ran, which was very inefficient under check-vfd.

Tested on:
    32- and 64-bit LE linux (jam and koala)
    64-bit BE linux (ostrich)
    64-bit OS-X 10.6 (fred)
2013-10-24 23:57:01 -05:00
Albert Cheng
bbd9ad0b27 [svn-r24214] Put in proper error message if unexpected switch values happened.
Tested: h5committest.
2013-09-28 15:40:01 -05:00
Albert Cheng
ebc0b44fe1 [svn-r24202] Bug fix: HDFFV-8271 Big.c error in address generated by random number.
Description:
There is a bug in the current big.c tests. In a nut-shell,
the writing part randomly picks 50 locations and write 4KB
from that location. Random location range is from byte 0
to end of dataset. There is the problem--if the random location
is greater than (end of dataset - 4KB), then error.

Solution:
Adjust the random number to be at least 4KB less than the end of the
dataset. That allows it write 4KB more from the generated starting
position.

Tested: h5comittest plus jam serial build and test.
2013-09-26 01:51:10 -05:00
Larry Knox
5dcd9c2dfc [svn-r23984] Merged 2 23932 from reduced_warnings branch:
Changes applied to eliminate several compiler warnings in the test directory in
files:
dt_arith.c
filter_fail.c
big.c
dynlib2.c
dynlib3.c
Also an HDassert(0 && "Unknown type"); statement was added to all 29 combination
s of
case OTHER:
default:
See crucible review HDF5-145 for more details.

Tested with h5committest.
2013-08-09 15:42:27 -05:00
Allen Byrne
058f9c2056 [svn-r22024] Add HD prefix to tools library based tests. Cleaned allocation/free in tests.
Tested: local linux/ changes h5committetest against 1.8 version
2012-03-05 09:17:14 -05:00
Albert Cheng
76c354a610 [svn-r19817] Bug 1917: Big.c test.
Changed the test to run Huge Dataset (tens of GB), Xtra large dataset(4GB big),
Large dataset (2GB big), or merely 1GB big, depending on if the file system
supports sparse file or if it supports larger than 32bigs I/O.

Tested: h5committest, jam (serial), Windows (Bangan which is Windows 7, 32bits).
2010-11-17 18:30:49 -05:00
Albert Cheng
69a5317860 [svn-r19795] Cleaned up some part of the code. It now works on all Unix and Windows 7
platforms.
2010-11-16 14:17:04 -05:00
Albert Cheng
2013dace18 [svn-r19764] Updated NPROCS default value from 3 to 6. 2010-11-11 13:17:02 -05:00
Albert Cheng
41f0057dbc [svn-r19167] Bug fix: 1917.
Description:
test/big incorrectly determined not able to write files larger than 2GB and
skipped the SEC2 and STDIO driver tests.  The reason was because it was using
off_t while the SEC2 driver is using lseek64 which expects off64_t type.

Solution:
Created a new HDoff_t which is set to off_t or off64_t or other appropriate
type depending on which of lseek or lseek64 is available. Changed SEC2 file
driver and the big test to use this common definition.

Tested:
In BP (AIX), using --enable and --disable-largefile, for both 32 and 64 bits
modes.  Did not do h5committest because: 1. the error was exposed in the remote
BP machine; 2. the change is trivial.
Note that STDIO driver failed when --disable-largefile is used. That is an
error in the STDIO driver code that is being fixed.
2010-08-03 18:35:42 -05:00
Quincey Koziol
f098d20ab9 [svn-r16847] Description:
Bring r16846 from revise_chunks branch back to trunk:

	Fix broken (for how long?) H5_ASSIGN_OVERFLOW macro to actually detect
overflows during assignments, along with several errors it [now] detected.

	Cleaned up a fix minor warnings and/or pieces of code also.

Tested on:
	FreeBSD/32 6.3 (duty) in debug mode
	(h5committest not needed - multi-platform test performed on branch)
2009-04-23 13:25:16 -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
Quincey Koziol
9f60f016ab [svn-r15800] Description:
Bring file free space branch changes through r15795 into trunk, which
includes a fair bit of code cleanup & rearrangement along with a couple of
bug fixes also.

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-06 23:17:35 -05:00
Quincey Koziol
bdd7d59902 [svn-r15628] Description:
Remove trailing whitespace from C/C++ source files, with the following
script:

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

Tested on:
    Mac OS X/32 10.5.5 (amazon)
    No need for h5committest, just whitespace changes...
2008-09-16 10:52:51 -05:00
Mike McGreevy
389cc309c5 [svn-r15007] Purpose: configure cleanup
Description: cleaning up configure related to removal of --disable-hsizet
             flag, which we no longer support.

Tested: kagiso
2008-05-15 11:42:03 -05:00
Quincey Koziol
d9e5ca72f3 [svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2

	Fix thread-safe error stack initialization for API versioned error
stack printing routines.

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (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/default API=1.6.x, w/C++ & FORTRAN,
                                in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                                in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                                w/szip filter, in production mode
        Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-11 11:24:11 -05:00
Quincey Koziol
16683943c6 [svn-r14193] Description:
Make H5Dopen versioned and change all internal usage to use H5Dopen2

	Add simple regression test for H5Dopen1

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (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/default API=1.6.x, w/C++ & FORTRAN,
                                in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                                in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                                w/szip filter, in production mode
        Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-08 14:59:36 -05:00
Quincey Koziol
63eb5b9ebb [svn-r14104] Description:
Pursue calls to H5Gcreate() relentlessly and ruthlessly exterminate
them, leaving only a few tame specimens in text files and comments.  ;-)

Tested on:
	Mac OS X/32 10.4.10 (amazon)
	FreeBSD/32 6.2 (duty)
	FreeBSD/64 6.2 (liberty)
	Linux/32 2.6 (kagiso)
	Linux/64 2.6 (smirom)
	Solaris/32 5.10 (linew)
2007-08-23 15:25:25 -05:00
Raymond Lu
b97859eccf [svn-r13832] Some minor changes - let each driver use its own file name respectively.
Tested on smirom because it's simple change.
2007-06-04 14:42:13 -05:00
Raymond Lu
156f8bc690 [svn-r13694] 1. changed the HDlseek to be lseek64 and HDfseek to be fseeko if available, to support big
files.  2. added a check in test/big.c to make sure the system supports big file.

Tested on smirom because already tested the same changes for v1.6 on liberty, smirom, 
copper, and sol.
2007-04-23 13:57:51 -05:00
Raymond Lu
019ee90da5 [svn-r13605] Add big file test for SEC2. 2007-04-06 15:00:04 -05:00
Raymond Lu
400f674284 [svn-r13596] Update document and comments. No test needed. 2007-04-05 15:34:51 -05:00
Raymond Lu
31ca50ac3a [svn-r13595] Add the macro check of H5_HAVE_FSEEKO for STDIO test. Without it
there'll be no big file support.

Tested on smirom because it's a simple change.
2007-04-05 15:25:50 -05:00
Raymond Lu
3431f74c43 [svn-r13588] A support of files bigger than 2GB for STDIO driver. Configure will
check if fseeko is available.  Using it instead of fseek can support
big files because the offset is of type off_t not long int.  Also 
added the test for STDIO in big.c.
2007-04-04 14:59:00 -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
James Laird
680fa675fb [svn-r10508]
Purpose:
Bug fix

Description:
test/big fails randomly with a message warning of 'possible overlap.'

Solution:
Have the random number generator check each value to make sure a write at
that position doesn't overlap any previous write.

Platforms tested:
sleipnir, modi4, eirene
2005-03-29 17:14:47 -05:00
Quincey Koziol
427ff7da28 [svn-r9727] Purpose:
Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-)

Description:
    Generally speaking, this is the "signed->unsigned" change to selections.
However, in the process of merging code back, things got stickier and stickier
until I ended up doing a big "sync the two branches up" operation.  So... I
brought back all the "infrastructure" fixes from the development branch to the
release branch (which I think were actually making some improvement in
performance) as well as fixed several bugs which had been fixed in one branch,
but not the other.

    I've also tagged the repository before making this checkin with the label
"before_signed_unsigned_changes".

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel & fphdf5
    FreeBSD 4.10 (sleipnir) w/threadsafe
    FreeBSD 4.10 (sleipnir) w/backward compatibility
    Solaris 2.7 (arabica) w/"purify options"
    Solaris 2.8 (sol) w/FORTRAN & C++
    AIX 5.x (copper) w/parallel & FORTRAN
    IRIX64 6.5 (modi4) w/FORTRAN
    Linux 2.4 (heping) w/FORTRAN & C++


Misc. update:
2004-12-29 09:26:20 -05:00
Quincey Koziol
f16e814f51 [svn-r9039] Purpose:
Code cleanup

Description:
    At user's suggestion, convert some "naked" standard library calls to use
the HD*() macros.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Too minor to require h5committest
2004-08-06 14:29:57 -05:00
Elena Pourmal
c319d5813a [svn-r6601]
Purpose: This a fix for bug #921

Description: On platforms where big test runs, it creates a set of
             "solid" 1GB files. Test will take forever (modi4) or will fail
             if quotas are exceeded.

Solution: Default library behavior is to allocate dataset space earlier and
          to write fill values. I changed the test to use late space allocation
          and never write fill values.

Platforms tested: True64 (PSC), modi4 (sequential and parallel), arabica with 64-bit
                  option(test was skipped there). I also enabled szip and it passed :-)


Misc. update:
2003-04-08 18:16:40 -05:00