Skip to content

Commit 3086158

Browse files
lrknoxhyokleeseanmderobinsgithub-actions[bot]
authored
Hdf5 merge issue 537 v110 (#545)
* close #195. (#196) * Update HDF5PluginMacros.cmake * Update HDF5PluginMacros.cmake * Modify temporary rpath for testing in java example scripts. (#230) * Fix undefined left shifting of negative numbers (#338) Undefined Bahavior Sanitizer errored here about left shifting negative numbers. * 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. * Cleans up a couple of MSVC warnings in testhdf5 (#475) * Fixes a few testhdf5 warnings raised in Visual Studio Visual Studio is grumpier about treating pointers like integers than gcc. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix typos and grammar errors. (#476) * Suppresses the tcheck_version test's abort dialog on Windows (#477) * Suppresses the tcheck_version test's abort dialog on Windows Windows raises a modal abort/retry/ignore dialog box when CRT calls abort(). This change installs a report hook that suppresses the dialog so that the CMake tests don't time out waiting for a nonexistent user to click a dialog box. * Committing clang-format changes * Removes __cdecl from callback Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * More warning fixes (#400) * Fixed -Wunused-local-typedef warning * Fixed -Wformat warnings In one case also removed a `z` character. There was a `z%d` that I think was supposed to be `%zd` * Fixed -Wshorten-64-to-32 warnings * Fixed -Wself-assign warnings * Fixed -Wreserved-id-macro warnings * Commit format changes from clang-format, clang version 10.0.1. * Fixed -Wself-assign warnings * Fixed -Wunused-local-typedef warning * Fixed -Wformat warnings In two cases also removed a `z` character. There was a `z%d` that was supposed to be `%zd`. * Fixed -Wshorten-64-to-32 warnings * Fixed -Wreserved-id-macro warnings * Fixed -Wself-assign warnings * Format source. * Remove blank lines to pass format check. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * Changes found during merge to 1.12 (#414) * 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 * Update supported platforms * Revert whitespace changes * Correct whitespace * Changes from PR#3 * HDFFV-11213 added option to control gcc10 warnings diagnostics * HDFFV-11212 Use the new references correctly in JNI utility and tests * format source * Fix typo * Add new test file * HDFFV-11212 - update test and remove unused arg * Minor non-space formatting changes * Use H5I_INVALID_ID instead of "-1" * source formatting * add missing testfile, update jni function * Undo commit of debug code * remove mislocated file * Fix h5repack test for handling of fapls and id close * Update h5diff test files usage text * HDFFV-11212 add new ref tests for JNI export dataset * src format update * Remove blank line typo * src format typo * long double requires %Lg * Another long double foramt specifer S.B. %Lg * issue with t128bit test * Windows issue with h5dump and type. * Fix review issues * refactor function nesting and fix error checks * format fixes * Remove untested functions and javadoc quiet comments * Restore TRY block. * Change string append errors to memory exception * revert to H5_JNI_FATAL_ERROR - support functions need work * Add assertion error for h5util functions * remove duplicate function * format fix * Revert HD function error handling * Update copyright comments * GH #386 java folder copyright corrections * Whitespace * GH #359 implement and fix tools 1.6 API usage * remove excessive comments * Flip inits to correct ifdef section * rework ifdef to be simpler * format issue * Reformat ifdef inits * remove static attribute * format compliance * Update names * Revert because logic relies on float not being int * Changes noticed from creating merge of #412 * Double underscore change * Correct compiler version variable used * Remove header guard underscores * Whitespace cleanup * File locks now work on Windows (#480) * File locks now work on Windows Uses LockFileEx() and UnlockFileEx(). Fixes HDFFV-10191 (partial). * Committing clang-format changes * Committing clang-format changes * Fixes commenting in h5repack * Reworks H5Fis_accessible() H5Fis_accessible() created a new file handle and attempted to read through it, which will fail when a file has been opened with an exclusive lock on operating systems that have mandatory locks. This change uses the same scheme we use in H5Fopen() to check if the file is already open and only tries to read the file signature if the file has not already been opened. Also adds a test for this behavior. * Committing clang-format changes * Trivial change to force github to run actions Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * small edits (#481) * 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 Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Adds an implementation for nanosleep on Windows (#483) * Adds an implementation for nanosleep on Windows * Committing clang-format changes * Fix insane formatter issue Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Updates HSYS_GOTO_ERROR to emit GetLastError() values on Win32 (#492) * Committing clang-format changes * Updates H5SYS_GOTO_ERROR to emit Win32's GetLastError() * Committing clang-format changes * Format source changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Updates that allow accum SWMR tests to work on Windows (#493) * Committing clang-format changes * Updates the accum test to work on Windows Uses CreateProcess() on Windows * Source formatting * Fix for Unix child result * Fixes process return code bug on Windows Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Disable long double tests and remove CMake flag groups (#494) * 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 * Update supported platforms * Revert whitespace changes * Correct whitespace * Changes from PR#3 * HDFFV-11213 added option to control gcc10 warnings diagnostics * HDFFV-11212 Use the new references correctly in JNI utility and tests * format source * Fix typo * Add new test file * HDFFV-11212 - update test and remove unused arg * Minor non-space formatting changes * Use H5I_INVALID_ID instead of "-1" * source formatting * add missing testfile, update jni function * Undo commit of debug code * remove mislocated file * Fix h5repack test for handling of fapls and id close * Update h5diff test files usage text * HDFFV-11212 add new ref tests for JNI export dataset * src format update * Remove blank line typo * src format typo * long double requires %Lg * Another long double foramt specifer S.B. %Lg * issue with t128bit test * Windows issue with h5dump and type. * Fix review issues * refactor function nesting and fix error checks * format fixes * Remove untested functions and javadoc quiet comments * Restore TRY block. * Change string append errors to memory exception * revert to H5_JNI_FATAL_ERROR - support functions need work * Add assertion error for h5util functions * remove duplicate function * format fix * Revert HD function error handling * Update copyright comments * GH #386 java folder copyright corrections * Whitespace * GH #359 implement and fix tools 1.6 API usage * remove excessive comments * Flip inits to correct ifdef section * rework ifdef to be simpler * format issue * Reformat ifdef inits * remove static attribute * format compliance * Update names * Revert because logic relies on float not being int * Changes noticed from creating merge of #412 * Double underscore change * Correct compiler version variable used * Remove header guard underscores * Whitespace cleanup * Split format source and commit changes on repo push * remove pre-split setting * Change windows TS to use older VS. * correct window os name * HDFFV-11212 JNI export util and Javadoc * Suggested review changes * Another change found * Committing clang-format changes * HDFFV-11113 long double in tools * HDFFV-11113 add note * Disable long double tests for now * HDFFV-11228 remove arbitrary CMake warning groups. * Make each flag a string Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Misc warning fixes (#495) * Committing clang-format changes * Misc warning fixes from Visual Studio * Committing clang-format changes * Fixes warnings in swmr.c test * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Correct merge errors. * Committing clang-format changes Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org> Co-authored-by: Sean McBride <sean@rogue-research.com> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: Scot Breitenfeld <brtnfld@hdfgroup.org>
1 parent a2b6c47 commit 3086158

38 files changed

+490
-464
lines changed

c++/src/H5AbstractDs.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
* help@hdfgroup.org. *
1313
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1414

15-
#ifndef AbstractDs_H
16-
#define AbstractDs_H
15+
#ifndef H5AbstractDs_H
16+
#define H5AbstractDs_H
1717

1818
namespace H5 {
1919

@@ -81,4 +81,4 @@ class H5_DLLCPP AbstractDs {
8181
}; // end of AbstractDs
8282
} // namespace H5
8383

84-
#endif // AbstractDs_H
84+
#endif // H5AbstractDs_H

c++/src/H5CommonFG.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
* help@hdfgroup.org. *
1313
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1414

15-
#ifndef CommonFG_H
16-
#define CommonFG_H
15+
#ifndef H5CommonFG_H
16+
#define H5CommonFG_H
1717

1818
namespace H5 {
1919

@@ -83,7 +83,7 @@ class H5_DLLCPP CommonFG {
8383
}; // end of CommonFG
8484
} // namespace H5
8585

86-
#endif // CommonFG_H
86+
#endif // H5CommonFG_H
8787

8888
/***************************************************************************
8989
Design Note

c++/src/H5Group.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
* help@hdfgroup.org. *
1313
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1414

15-
#ifndef Group_H
16-
#define Group_H
15+
#ifndef H5Group_H
16+
#define H5Group_H
1717

1818
namespace H5 {
1919

@@ -83,4 +83,4 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
8383
}; // end of Group
8484
} // namespace H5
8585

86-
#endif // Group_H
86+
#endif // H5Group_H

c++/src/H5IdComponent.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
* help@hdfgroup.org. *
1313
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1414

15-
#ifndef IdComponent_H
16-
#define IdComponent_H
15+
#ifndef H5IdComponent_H
16+
#define H5IdComponent_H
1717

1818
namespace H5 {
1919

@@ -113,4 +113,4 @@ class H5_DLLCPP IdComponent {
113113
}; // end class IdComponent
114114
} // namespace H5
115115

116-
#endif // IdComponent_H
116+
#endif // H5IdComponent_H

c++/test/tarray.cpp

+15-12
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ test_array_compound_array()
8181
// Initialize array data to write
8282
for (idxi = 0; idxi < SPACE1_DIM1; idxi++)
8383
for (idxj = 0; idxj < ARRAY1_DIM1; idxj++) {
84-
wdata[idxi][idxj].i = idxi * 10 + idxj;
84+
wdata[idxi][idxj].i = static_cast<int>(idxi * 10 + idxj);
8585
for (idxk = 0; idxk < ARRAY1_DIM1; idxk++) {
8686
float temp = idxi * 10.0 + idxj * 2.5 + idxk;
8787
wdata[idxi][idxj].f[idxk] = temp;
@@ -178,8 +178,9 @@ test_array_compound_array()
178178
// Check the array dimensions
179179
for (ii = 0; ii < ndims; ii++)
180180
if (rdims1[ii] != tdims1[ii]) {
181-
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%zd, tdims1[%d]=z%d\n",
182-
ii, rdims1[ii], ii, tdims1[ii]);
181+
TestErrPrintf(
182+
"Array dimension information doesn't match!, rdims1[%d]=%lld, tdims1[%d]=%lld\n", ii,
183+
rdims1[ii], ii, tdims1[ii]);
183184
continue;
184185
} // end if
185186

@@ -196,8 +197,9 @@ test_array_compound_array()
196197
// Check the array dimensions
197198
for (ii = 0; ii < ndims; ii++)
198199
if (rdims1[ii] != tdims1[ii]) {
199-
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%zd, tdims1[%d]=%zd\n",
200-
ii, rdims1[ii], ii, tdims1[ii]);
200+
TestErrPrintf(
201+
"Array dimension information doesn't match!, rdims1[%d]=%lld, tdims1[%d]=%lld\n", ii,
202+
rdims1[ii], ii, tdims1[ii]);
201203
continue;
202204
} // end if
203205

@@ -246,8 +248,9 @@ test_array_compound_array()
246248
// Check the array dimensions
247249
for (ii = 0; ii < ndims; ii++)
248250
if (rdims1[ii] != tdims1[ii]) {
249-
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%zd, tdims1[%d]=%zd\n",
250-
ii, rdims1[ii], ii, tdims1[ii]);
251+
TestErrPrintf(
252+
"Array dimension information doesn't match!, rdims1[%d]=%lld, tdims1[%d]=%lld\n", ii,
253+
rdims1[ii], ii, tdims1[ii]);
251254
continue;
252255
} // end if
253256

@@ -262,9 +265,9 @@ test_array_compound_array()
262265
for (idxi = 0; idxi < SPACE1_DIM1; idxi++) {
263266
for (idxj = 0; idxj < ARRAY1_DIM1; idxj++) {
264267
if (wdata[idxi][idxj].i != rdata[idxi][idxj].i) {
265-
TestErrPrintf(
266-
"Array data information doesn't match!, wdata[%d][%d].i=%d, rdata[%d][%d].i=%d\n",
267-
idxi, idxj, wdata[idxi][idxj].i, idxi, idxj, rdata[idxi][idxj].i);
268+
TestErrPrintf("Array data information doesn't match!, wdata[%lld][%lld].i=%d, "
269+
"rdata[%lld][%lld].i=%d\n",
270+
idxi, idxj, wdata[idxi][idxj].i, idxi, idxj, rdata[idxi][idxj].i);
268271
continue;
269272
} // end if
270273
} // end for
@@ -383,7 +386,7 @@ test_array_info()
383386
// Initialize array data to write
384387
for (idxi = 0; idxi < SPACE1_DIM1; idxi++)
385388
for (idxj = 0; idxj < ARRAY1_DIM1; idxj++) {
386-
wdata[idxi][idxj].i = idxi * 10 + idxj;
389+
wdata[idxi][idxj].i = static_cast<int>(idxi * 10 + idxj);
387390
for (idxk = 0; idxk < ARRAY1_DIM1; idxk++) {
388391
float temp = idxi * 10.0 + idxj * 2.5 + idxk;
389392
wdata[idxi][idxj].f[idxk] = temp;
@@ -455,7 +458,7 @@ test_array_info()
455458
for (ii = 0; ii < ndims; ii++)
456459
if (rdims1[ii] != tdims1[ii]) {
457460
TestErrPrintf(
458-
"Array dimension information doesn't match!, rdims1[%d]=%zd, tdims1[%d]=z%d\n", ii,
461+
"Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=z%llu\n", ii,
459462
rdims1[ii], ii, tdims1[ii]);
460463
continue;
461464
} // end if

c++/test/tattr.cpp

+18-18
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ test_attr_basic_write()
169169
// Verify values read in
170170
for (i = 0; i < ATTR1_DIM1; i++)
171171
if (attr_data1[i] != read_data1[i])
172-
TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d,read_data1[%d]=%d\n", __LINE__,
173-
i, attr_data1[i], i, read_data1[i]);
172+
TestErrPrintf("%d: attribute data different: attr_data1[%llu]=%d,read_data1[%llu]=%d\n",
173+
__LINE__, i, attr_data1[i], i, read_data1[i]);
174174

175175
// Create two more attributes for this dataset, but only write to one.
176176
Attribute ds_attr2 = dataset.createAttribute(ATTR2_NAME, PredType::NATIVE_INT, att_space);
@@ -185,7 +185,7 @@ test_attr_basic_write()
185185
// Verify values read in
186186
for (i = 0; i < ATTR1_DIM1; i++)
187187
if (attr_data1a[i] != read_data1[i])
188-
TestErrPrintf("%d: attribute data different: attr_data1a[%d]=%d,read_data1[%d]=%d\n",
188+
TestErrPrintf("%d: attribute data different: attr_data1a[%llu]=%d,read_data1[%llu]=%d\n",
189189
__LINE__, i, attr_data1a[i], i, read_data1[i]);
190190

191191
// Close both attributes
@@ -448,8 +448,8 @@ test_attr_rename()
448448
// Verify values read in
449449
for (i = 0; i < ATTR1_DIM1; i++)
450450
if (attr_data1[i] != read_data1[i])
451-
TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d,read_data1[%d]=%d\n", __LINE__,
452-
i, attr_data1[i], i, read_data1[i]);
451+
TestErrPrintf("%d: attribute data different: attr_data1[%llu]=%d,read_data1[%llu%d\n",
452+
__LINE__, i, attr_data1[i], i, read_data1[i]);
453453

454454
// Close attribute
455455
attr1.close();
@@ -472,7 +472,7 @@ test_attr_rename()
472472
// Verify values read in
473473
for (i = 0; i < ATTR1_DIM1; i++)
474474
if (attr_data1a[i] != read_data1[i])
475-
TestErrPrintf("%d: attribute data different: attr_data1a[%d]=%d,read_data1[%d]=%d\n",
475+
TestErrPrintf("%d: attribute data different: attr_data1a[%llu]=%d,read_data1[%llu]=%d\n",
476476
__LINE__, i, attr_data1a[i], i, read_data1[i]);
477477

478478
// Close attribute
@@ -537,7 +537,7 @@ test_attr_basic_read()
537537
// Verify values read in
538538
for (i = 0; i < ATTR1_DIM1; i++)
539539
if (attr_data1[i] != read_data1[i])
540-
TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d, read_data1[%d]=%d\n",
540+
TestErrPrintf("%d: attribute data different: attr_data1[%llu]=%d, read_data1[%llu]=%d\n",
541541
__LINE__, i, attr_data1[i], i, read_data1[i]);
542542

543543
/*
@@ -568,9 +568,9 @@ test_attr_basic_read()
568568
for (i = 0; i < ATTR2_DIM1; i++)
569569
for (j = 0; j < ATTR2_DIM2; j++)
570570
if (attr_data2[i][j] != read_data2[i][j]) {
571-
TestErrPrintf(
572-
"%d: attribute data different: attr_data2[%d][%d]=%d, read_data2[%d][%d]=%d\n",
573-
__LINE__, i, j, attr_data2[i][j], i, j, read_data2[i][j]);
571+
TestErrPrintf("%d: attribute data different: attr_data2[%llu][%llu]=%d, "
572+
"read_data2[%llu][%llu]=%d\n",
573+
__LINE__, i, j, attr_data2[i][j], i, j, read_data2[i][j]);
574574
}
575575
PASSED();
576576
} // end try block
@@ -1044,7 +1044,7 @@ test_attr_mult_read()
10441044
hsize_t dims[ATTR_MAX_DIMS]; // Attribute dimensions
10451045
int ndims = space.getSimpleExtentDims(dims);
10461046
if ((long)dims[0] != (long)ATTR1_DIM1)
1047-
TestErrPrintf("%d:attribute dimensions different: dims[0]=%d, should be %d\n", __LINE__,
1047+
TestErrPrintf("%d:attribute dimensions different: dims[0]=%d, should be %llu\n", __LINE__,
10481048
(int)dims[0], ATTR1_DIM1);
10491049

10501050
/* Verify Datatype */
@@ -1072,8 +1072,8 @@ test_attr_mult_read()
10721072
// Verify values read in
10731073
for (i = 0; i < ATTR1_DIM1; i++)
10741074
if (attr_data1[i] != read_data1[i])
1075-
TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d,read_data1[%d]=%d\n", __LINE__,
1076-
i, attr_data1[i], i, read_data1[i]);
1075+
TestErrPrintf("%d: attribute data different: attr_data1[%llu]=%d,read_data1[%llu]=%d\n",
1076+
__LINE__, i, attr_data1[i], i, read_data1[i]);
10771077

10781078
// Verify Name
10791079
H5std_string attr_name = attr.getName();
@@ -1127,9 +1127,9 @@ test_attr_mult_read()
11271127
for (i = 0; i < ATTR2_DIM1; i++)
11281128
for (j = 0; j < ATTR2_DIM2; j++)
11291129
if (attr_data2[i][j] != read_data2[i][j])
1130-
TestErrPrintf(
1131-
"%d: attribute data different: attr_data2[%d][%d]=%d, read_data2[%d][%d]=%d\n",
1132-
__LINE__, i, j, attr_data2[i][j], i, j, read_data2[i][j]);
1130+
TestErrPrintf("%d: attribute data different: attr_data2[%llu][%llu]=%d, "
1131+
"read_data2[%llu][%llu]=%d\n",
1132+
__LINE__, i, j, attr_data2[i][j], i, j, read_data2[i][j]);
11331133

11341134
// Verify Name
11351135
attr_name = attr.getName();
@@ -1182,8 +1182,8 @@ test_attr_mult_read()
11821182
for (j = 0; j < ATTR3_DIM2; j++)
11831183
for (k = 0; k < ATTR3_DIM3; k++)
11841184
if (attr_data3[i][j][k] != read_data3[i][j][k])
1185-
TestErrPrintf("%d: attribute data different: attr_data3[%d][%d][%d]=%f, "
1186-
"read_data3[%d][%d][%d]=%f\n",
1185+
TestErrPrintf("%d: attribute data different: attr_data3[%llu][%llu][%llu]=%f, "
1186+
"read_data3[%llu][%llu][%llu]=%f\n",
11871187
__LINE__, i, j, k, attr_data3[i][j][k], i, j, k, read_data3[i][j][k]);
11881188

11891189
// Verify Name

0 commit comments

Comments
 (0)