Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
third-party
moab
Commits
4e054031
Commit
4e054031
authored
Oct 07, 2016
by
vijaysm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some more assert related issues in WriteHDF5
parent
c4e3f0ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
29 deletions
+9
-29
src/io/WriteHDF5.cpp
src/io/WriteHDF5.cpp
+9
-29
No files found.
src/io/WriteHDF5.cpp
View file @
4e054031
...
...
@@ -55,28 +55,8 @@
#error Attempt to compile WriteHDF5 with HDF5 support disabled
#endif
/* Access HDF5 file handle for debugging
#include <H5Fpublic.h>
struct file { uint32_t magic; hid_t handle; };
*/
#undef DEBUG
#undef BLOCKED_COORD_IO
#ifdef DEBUG
/*
# include <H5Epublic.h>
extern "C" herr_t hdf_error_handler(void*)
{
H5Eprint(stderr);
assert(0);
}
*/
# define myassert(A) assert(A)
#else
# define myassert(A)
#endif
#ifdef MOAB_HAVE_VALGRIND
# include <valgrind/memcheck.h>
#else
...
...
@@ -172,7 +152,7 @@ static herr_t handle_hdf5_error(void* data)
do { \
if (mhdf_isError(&(A))) { \
MB_SET_ERR_CONT(mhdf_message(&(A))); \
my
assert(0); \
assert(0); \
return error(MB_FAILURE); \
} \
} while (false)
...
...
@@ -181,7 +161,7 @@ do { \
do { \
if (mhdf_isError(&(A))) { \
MB_SET_ERR_CONT(mhdf_message(&(A))); \
my
assert(0); \
assert(0); \
mhdf_closeData(filePtr, (B), &(A)); \
return error(MB_FAILURE); \
} \
...
...
@@ -191,7 +171,7 @@ do { \
do { \
if (mhdf_isError(&(A))) { \
MB_SET_ERR_CONT(mhdf_message(&(A))); \
my
assert(0); \
assert(0); \
mhdf_closeData(filePtr, (B)[0], &(A)); \
mhdf_closeData(filePtr, (B)[1], &(A)); \
return error(MB_FAILURE); \
...
...
@@ -202,7 +182,7 @@ do { \
do { \
if (mhdf_isError(&(A))) { \
MB_SET_ERR_CONT(mhdf_message(&(A))); \
my
assert(0); \
assert(0); \
mhdf_closeData(filePtr, (B)[0], &(A)); \
mhdf_closeData(filePtr, (B)[1], &(A)); \
mhdf_closeData(filePtr, (B)[2], &(A)); \
...
...
@@ -214,7 +194,7 @@ do { \
do { \
if (mhdf_isError(&(A))) { \
MB_SET_ERR_CONT(mhdf_message(&(A))); \
my
assert(0); \
assert(0); \
mhdf_closeData(filePtr, (B), &(A)); \
if (C) mhdf_closeData(filePtr, (D), &(A)); \
return error(MB_FAILURE); \
...
...
@@ -234,7 +214,7 @@ do { \
if (MB_SUCCESS != (A)) { \
MB_CHK_ERR_CONT((A)); \
mhdf_closeData(filePtr, (B), &(C)); \
my
assert(0); \
assert(0); \
return error(A); \
} \
} while (false)
...
...
@@ -246,7 +226,7 @@ do { \
mhdf_closeData(filePtr, (B)[0], &(C)); \
mhdf_closeData(filePtr, (B)[1], &(C)); \
write_finished(); \
my
assert(0); \
assert(0); \
return error(A); \
} \
} while (false)
...
...
@@ -259,7 +239,7 @@ do { \
mhdf_closeData(filePtr, (B)[1], &(C)); \
mhdf_closeData(filePtr, (B)[2], &(C)); \
write_finished(); \
my
assert(0); \
assert(0); \
return error(A); \
} \
} while (false)
...
...
@@ -272,7 +252,7 @@ do { \
if (C) \
mhdf_closeData(filePtr, (D), &(E)); \
write_finished(); \
my
assert(0); \
assert(0); \
return error(A); \
} \
} while (false)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment