From 1b082cf2c20eecc1ac91e3489bfc6105d05a3f48 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 11 Jun 2002 15:02:27 -0500 Subject: [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) --- test/dtypes.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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), -- cgit v0.12