summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2021-04-01 20:14:21 (GMT)
committerGitHub <noreply@github.com>2021-04-01 20:14:21 (GMT)
commit87d18137ceed7eae1ca7009dda6f4cf2841ff195 (patch)
tree291983f4bc5f9230bf53564e8555272319d382aa /hl
parentdf75d35cc5295b03dc305ca7e5495fece5737d30 (diff)
downloadhdf5-87d18137ceed7eae1ca7009dda6f4cf2841ff195.zip
hdf5-87d18137ceed7eae1ca7009dda6f4cf2841ff195.tar.gz
hdf5-87d18137ceed7eae1ca7009dda6f4cf2841ff195.tar.bz2
Hdf5 merge issue 487 v110 (#533)
* 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> * Committing clang-format changes 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: H. Joe Lee <hyoklee@hdfgroup.org>
Diffstat (limited to 'hl')
-rw-r--r--hl/c++/src/H5PacketTable.cpp23
-rw-r--r--hl/c++/src/H5PacketTable.h9
-rw-r--r--hl/c++/test/ptableTest.cpp5
-rw-r--r--hl/src/H5DS.c5
-rw-r--r--hl/src/H5LD.c5
-rw-r--r--hl/src/H5LT.c5
-rw-r--r--hl/test/test_ds.c5
-rw-r--r--hl/test/test_file_image.c5
-rw-r--r--hl/test/test_image.c15
-rw-r--r--hl/test/test_ld.c20
-rw-r--r--hl/tools/gif2h5/gifread.c5
11 files changed, 81 insertions, 21 deletions
diff --git a/hl/c++/src/H5PacketTable.cpp b/hl/c++/src/H5PacketTable.cpp
index eca3ed1..0f47b0d 100644
--- a/hl/c++/src/H5PacketTable.cpp
+++ b/hl/c++/src/H5PacketTable.cpp
@@ -32,15 +32,24 @@
* Opens an existing packet table, which can contain either fixed-length or
* variable-length packets.
*/
-PacketTable::PacketTable(hid_t fileID, const char *name) { table_id = H5PTopen(fileID, name); }
+PacketTable::PacketTable(hid_t fileID, const char *name)
+{
+ table_id = H5PTopen(fileID, name);
+}
/* "Open" Constructor - will be deprecated because of char* name */
-PacketTable::PacketTable(hid_t fileID, char *name) { table_id = H5PTopen(fileID, name); }
+PacketTable::PacketTable(hid_t fileID, char *name)
+{
+ table_id = H5PTopen(fileID, name);
+}
/* Destructor
* Cleans up the packet table
*/
-PacketTable::~PacketTable() { H5PTclose(table_id); }
+PacketTable::~PacketTable()
+{
+ H5PTclose(table_id);
+}
/* IsValid
* Returns true if this packet table is valid, false otherwise.
@@ -206,10 +215,14 @@ FL_PacketTable::FL_PacketTable(hid_t fileID, char *name, hid_t dtypeID, hsize_t
* Opens an existing fixed-length packet table.
* Fails if the packet table specified is variable-length.
*/
-FL_PacketTable::FL_PacketTable(hid_t fileID, const char *name) : PacketTable(fileID, name) {}
+FL_PacketTable::FL_PacketTable(hid_t fileID, const char *name) : PacketTable(fileID, name)
+{
+}
/* "Open" Constructor - will be deprecated because of char* name */
-FL_PacketTable::FL_PacketTable(hid_t fileID, char *name) : PacketTable(fileID, name) {}
+FL_PacketTable::FL_PacketTable(hid_t fileID, char *name) : PacketTable(fileID, name)
+{
+}
/* AppendPacket
* Adds a single packet to the packet table. Takes a pointer
diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h
index 825caf7..a73b4c9 100644
--- a/hl/c++/src/H5PacketTable.h
+++ b/hl/c++/src/H5PacketTable.h
@@ -33,7 +33,10 @@ class H5_HLCPPDLL PacketTable {
/* Null constructor
* Sets table_id to "invalid"
*/
- PacketTable() { table_id = H5I_BADID; }
+ PacketTable()
+ {
+ table_id = H5I_BADID;
+ }
/* "Open" Constructor
* Opens an existing packet table, which can contain either fixed-length or
@@ -163,7 +166,9 @@ class H5_HLCPPDLL FL_PacketTable : virtual public PacketTable {
/* Destructor
* Cleans up the packet table
*/
- virtual ~FL_PacketTable() {}
+ virtual ~FL_PacketTable()
+ {
+ }
/* AppendPacket
* Adds a single packet to the packet table. Takes a pointer
diff --git a/hl/c++/test/ptableTest.cpp b/hl/c++/test/ptableTest.cpp
index 8e71557..2b56ec0 100644
--- a/hl/c++/test/ptableTest.cpp
+++ b/hl/c++/test/ptableTest.cpp
@@ -191,7 +191,10 @@ TestCompoundDatatype()
error:
- H5E_BEGIN_TRY { H5Tclose(dtypeID); }
+ H5E_BEGIN_TRY
+ {
+ H5Tclose(dtypeID);
+ }
H5E_END_TRY;
H5_FAILED();
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c
index c7626c6..6eb3d8b 100644
--- a/hl/src/H5DS.c
+++ b/hl/src/H5DS.c
@@ -2167,7 +2167,10 @@ H5DS_get_REFLIST_type(void)
return ntid_t;
out:
- H5E_BEGIN_TRY { H5Tclose(ntid_t); }
+ H5E_BEGIN_TRY
+ {
+ H5Tclose(ntid_t);
+ }
H5E_END_TRY;
return FAIL;
}
diff --git a/hl/src/H5LD.c b/hl/src/H5LD.c
index 1307fda..8bfd0d6 100644
--- a/hl/src/H5LD.c
+++ b/hl/src/H5LD.c
@@ -303,7 +303,10 @@ H5LD_get_dset_dims(hid_t did, hsize_t *cur_dims)
ret_value = SUCCEED;
done:
- H5E_BEGIN_TRY { H5Sclose(sid); }
+ H5E_BEGIN_TRY
+ {
+ H5Sclose(sid);
+ }
H5E_END_TRY;
return (ret_value);
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index 18af730..0288ac6 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -907,7 +907,10 @@ H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
return file_id;
out:
- H5E_BEGIN_TRY { H5Pclose(fapl); }
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(fapl);
+ }
H5E_END_TRY;
return -1;
} /* end H5LTopen_file_image() */
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index 90110a4..941b44a 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -3740,7 +3740,10 @@ match_dim_scale(hid_t did, unsigned dim, hid_t dsid, void *visitor_data)
return ret;
out:
- H5E_BEGIN_TRY { H5Sclose(sid); }
+ H5E_BEGIN_TRY
+ {
+ H5Sclose(sid);
+ }
H5E_END_TRY;
return FAIL;
}
diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c
index f820568..b397a81 100644
--- a/hl/test/test_file_image.c
+++ b/hl/test/test_file_image.c
@@ -335,7 +335,10 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
VERIFY(status1 < 0, "H5Dwrite() should have failed");
/* extend dimensions of dataset */
- H5E_BEGIN_TRY { status1 = H5Dset_extent(dset_id[i], dims4); }
+ H5E_BEGIN_TRY
+ {
+ status1 = H5Dset_extent(dset_id[i], dims4);
+ }
H5E_END_TRY;
VERIFY(status1 < 0, "H5Dset_extent() should have failed");
diff --git a/hl/test/test_image.c b/hl/test/test_image.c
index b71531e..0c7d511 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -301,7 +301,10 @@ out:
HDfree(buf1_out);
if (buf2_out)
HDfree(buf2_out);
- H5E_BEGIN_TRY { H5Fclose(fid); }
+ H5E_BEGIN_TRY
+ {
+ H5Fclose(fid);
+ }
H5E_END_TRY;
H5_FAILED();
return FAIL;
@@ -488,7 +491,10 @@ out:
if (image_data)
HDfree(image_data);
- H5E_BEGIN_TRY { H5Fclose(fid); }
+ H5E_BEGIN_TRY
+ {
+ H5Fclose(fid);
+ }
H5E_END_TRY;
H5_FAILED();
@@ -720,7 +726,10 @@ out:
if (image_data)
HDfree(image_data);
- H5E_BEGIN_TRY { H5Fclose(fid); }
+ H5E_BEGIN_TRY
+ {
+ H5Fclose(fid);
+ }
H5E_END_TRY;
if (f)
HDfclose(f);
diff --git a/hl/test/test_ld.c b/hl/test/test_ld.c
index 02a56f4..dc5755c 100644
--- a/hl/test/test_ld.c
+++ b/hl/test/test_ld.c
@@ -252,7 +252,10 @@ test_LD_dims_params(const char *file)
/*
* 1. Verify failure with negative dataset id
*/
- H5E_BEGIN_TRY { ret = H5LDget_dset_dims(invalid_id, one_cur_dims); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5LDget_dset_dims(invalid_id, one_cur_dims);
+ }
H5E_END_TRY;
VERIFY_EQUAL(ret, FAIL)
@@ -261,7 +264,10 @@ test_LD_dims_params(const char *file)
*/
if ((did = H5Dopen2(fid, DSET_ALLOC_EARLY, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
- H5E_BEGIN_TRY { ret = H5LDget_dset_dims(did, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5LDget_dset_dims(did, NULL);
+ }
H5E_END_TRY;
VERIFY_EQUAL(ret, FAIL)
if (H5Dclose(did) < 0)
@@ -536,7 +542,10 @@ test_LD_size(const char *file)
/*
* Verify failure with an invalid dataset id
*/
- H5E_BEGIN_TRY { dsize = H5LDget_dset_type_size(invalid_id, NULL); }
+ H5E_BEGIN_TRY
+ {
+ dsize = H5LDget_dset_type_size(invalid_id, NULL);
+ }
H5E_END_TRY;
VERIFY_EQUAL(dsize, 0)
@@ -916,7 +925,10 @@ test_LD_elmts_invalid(const char *file)
*/
/* Verify failure from case #1: an invalid dataset id */
- H5E_BEGIN_TRY { ret = H5LDget_dset_elmts(invalid_id, prev_dims, cur_dims, NULL, tbuf); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5LDget_dset_elmts(invalid_id, prev_dims, cur_dims, NULL, tbuf);
+ }
H5E_END_TRY;
VERIFY_EQUAL(ret, FAIL)
diff --git a/hl/tools/gif2h5/gifread.c b/hl/tools/gif2h5/gifread.c
index d2afbc4..dd9e5be 100644
--- a/hl/tools/gif2h5/gifread.c
+++ b/hl/tools/gif2h5/gifread.c
@@ -38,7 +38,10 @@ GetWord(GIFBYTE *MemGif)
}
GIFBYTE
-GetByte(const GIFBYTE *MemGif) { return *MemGif; }
+GetByte(const GIFBYTE *MemGif)
+{
+ return *MemGif;
+}
/*
* Read a GIF image GIFBYTE Header.