summaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-09-14 03:58:59 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-09-14 03:58:59 (GMT)
commit102337449220dfc29be1cce29147704b9c760832 (patch)
tree2f57d117f2bd934eac2768be18dcc866619f390f /tools/misc
parentf16361d5f1dc70c344d8143270aa4aeaa867f244 (diff)
downloadhdf5-102337449220dfc29be1cce29147704b9c760832.zip
hdf5-102337449220dfc29be1cce29147704b9c760832.tar.gz
hdf5-102337449220dfc29be1cce29147704b9c760832.tar.bz2
[svn-r27768] Description:
Complete revamp of package initialization/shutdown mechanism in the library. Each package now has a single init/term routine. This new way should avoid packages being re-initialized during library shutdown and is also be _much_ more proactive about giving feedback for resource leaks internal to the library. Introduces a new "module" header file for packages in the library (e.g src/H5Fmodule.h) which sets up some necessary package configuration macros for the FUNC_ENTER/LEAVE macros. (The VFL drivers have their own slightly modified version of this header, src/H5FDdrvr_module.h) Also cleaned up a bunch of resources leaks all across the library and tests, along with addressing many warnings, as I encountered them. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel Linux/64 3.10.x (kituo) w/serial & parallel Linux/64 2.6.x (ostrich) w/serial
Diffstat (limited to 'tools/misc')
-rw-r--r--tools/misc/h5debug.c26
-rw-r--r--tools/misc/talign.c3
2 files changed, 16 insertions, 13 deletions
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index 3789723..480450d 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -23,19 +23,19 @@
*
*-------------------------------------------------------------------------
*/
-#define H5A_PACKAGE /*suppress error about including H5Apkg */
-#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
-#define H5B2_TESTING /*suppress warning about H5B2 testing funcs*/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-#define H5EA_PACKAGE /*suppress error about including H5EApkg */
-#define H5EA_TESTING /*suppress warning about H5EA testing funcs*/
-#define H5FA_PACKAGE /*suppress error about including H5FApkg */
-#define H5FA_TESTING /*suppress warning about H5FA testing funcs*/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#define H5SM_PACKAGE /*suppress error about including H5SMpkg */
+#define H5A_FRIEND /*suppress error about including H5Apkg */
+#define H5B2_FRIEND /*suppress error about including H5B2pkg */
+#define H5B2_TESTING /*suppress warning about H5B2 testing funcs*/
+#define H5D_FRIEND /*suppress error about including H5Dpkg */
+#define H5EA_FRIEND /*suppress error about including H5EApkg */
+#define H5EA_TESTING /*suppress warning about H5EA testing funcs*/
+#define H5FA_FRIEND /*suppress error about including H5FApkg */
+#define H5FA_TESTING /*suppress warning about H5FA testing funcs*/
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5G_FRIEND /*suppress error about including H5Gpkg */
+#define H5HF_FRIEND /*suppress error about including H5HFpkg */
+#define H5O_FRIEND /*suppress error about including H5Opkg */
+#define H5SM_FRIEND /*suppress error about including H5SMpkg */
#include "H5private.h" /* Generic Functions */
#include "H5Apkg.h" /* Attributes */
diff --git a/tools/misc/talign.c b/tools/misc/talign.c
index 2d0a9d1..1a26a28 100644
--- a/tools/misc/talign.c
+++ b/tools/misc/talign.c
@@ -137,6 +137,7 @@ int main(void)
H5Dread(set, fix, spc, H5S_ALL, H5P_DEFAULT, data);
fptr = (float *)(data + H5Tget_member_offset(fix, 1));
+ H5Dclose(set);
out:
if(error < 0) {
@@ -194,7 +195,9 @@ out:
if(data)
HDfree(data);
H5Sclose(spc);
+ H5Tclose(cs6);
H5Tclose(cmp);
+ H5Tclose(fix);
H5Tclose(cmp1);
H5Tclose(cmp2);
H5Tclose(cmp3);