diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-11 20:03:08 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-11 20:03:08 (GMT) |
commit | 20cd00bffe32d134c140fb168322a1d2dc404342 (patch) | |
tree | 4776564af4cc974f34453c6c6f952f2171c5e46a | |
parent | 29227e0a1dc37c0d1560ef6d058375b50b3f0610 (diff) | |
download | hdf5-20cd00bffe32d134c140fb168322a1d2dc404342.zip hdf5-20cd00bffe32d134c140fb168322a1d2dc404342.tar.gz hdf5-20cd00bffe32d134c140fb168322a1d2dc404342.tar.bz2 |
[svn-r5598] 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)
-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 34f7639..df26823 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -402,6 +402,7 @@ test_compound_1(void) { complex_t tmp; hid_t complex_id; + herr_t ret; TESTING("compound data types"); @@ -409,7 +410,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 type into itself?\n"); + goto error; + } /* end if */ /* Add a couple fields */ if (H5Tinsert(complex_id, "real", HOFFSET(complex_t, re), |