diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-11 20:02:27 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-11 20:02:27 (GMT) |
commit | 1b082cf2c20eecc1ac91e3489bfc6105d05a3f48 (patch) | |
tree | 374546edf973ac09b7c68331976ffbe6df44dadd /test/dtypes.c | |
parent | 2206ffc090aeb60f8bdd81aba4abe6c2420fdfcd (diff) | |
download | hdf5-1b082cf2c20eecc1ac91e3489bfc6105d05a3f48.zip hdf5-1b082cf2c20eecc1ac91e3489bfc6105d05a3f48.tar.gz hdf5-1b082cf2c20eecc1ac91e3489bfc6105d05a3f48.tar.bz2 |
[svn-r5597] Purpose:
Code cleanup
Description:
The test for inserting a compound datatype into itself (which should fail)
is issuing warnings about this failure.
Solution:
Turn the warnings off during this test.
Platforms tested:
FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'test/dtypes.c')
-rw-r--r-- | test/dtypes.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/dtypes.c b/test/dtypes.c index 1dbd650..4693a4d 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -391,6 +391,7 @@ test_compound_1(void) { complex_t tmp; hid_t complex_id; + herr_t ret; TESTING("compound data types"); @@ -398,7 +399,14 @@ test_compound_1(void) if ((complex_id = H5Tcreate(H5T_COMPOUND, sizeof tmp))<0) goto error; /* Attempt to add the new compound datatype as a field within itself */ - if (H5Tinsert(complex_id, "compound", 0, complex_id)>=0) goto error; + H5E_BEGIN_TRY { + ret=H5Tinsert(complex_id, "compound", 0, complex_id); + } H5E_END_TRY; + if (ret>=0) { + H5_FAILED(); + printf("Inserted compound datatype into itself?\n"); + goto error; + } /* end if */ /* Add a couple fields */ if (H5Tinsert(complex_id, "real", HOFFSET(complex_t, re), |