Skip to content

Commit

Permalink
H5_LEAVE
Browse files Browse the repository at this point in the history
  • Loading branch information
seanm committed Jul 21, 2023
1 parent 16d32e0 commit bcd6fb0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tools/lib/h5tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -2168,7 +2168,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *strea
if (dtype > 0 && H5Tclose(dtype) < 0)
H5TOOLS_ERROR(FALSE, "H5Tclose failed");

H5_LEAVE(TRUE)
H5_LEAVE(TRUE);

CATCH
H5TOOLS_ENDDEBUG(" ");
Expand Down Expand Up @@ -2283,7 +2283,7 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *strea
if (dtype > 0 && H5Tclose(dtype) < 0)
H5TOOLS_ERROR(FALSE, "H5Tclose failed");

H5_LEAVE(ret_value)
H5_LEAVE(ret_value);
CATCH
H5TOOLS_ENDDEBUG(" ");
return ret_value;
Expand Down
6 changes: 3 additions & 3 deletions tools/lib/h5tools_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region } element end */

H5_LEAVE(dimension_break)
H5_LEAVE(dimension_break);

CATCH

Expand Down Expand Up @@ -843,7 +843,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region } element end */

H5_LEAVE(dimension_break)
H5_LEAVE(dimension_break);

CATCH

Expand Down Expand Up @@ -1198,7 +1198,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region } element end */

H5_LEAVE(dimension_break)
H5_LEAVE(dimension_break);
CATCH

H5TOOLS_ENDDEBUG(" ");
Expand Down
6 changes: 3 additions & 3 deletions tools/lib/h5tools_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ catch_except:;
* it.
*/
#define H5_LEAVE(v) \
{ \
do { \
ret_value = v; \
if (!past_catch) \
goto catch_except; \
}
} while(0)

/*
* H5TOOLS_THROW macro, used to facilitate error reporting within a function body.
Expand All @@ -238,7 +238,7 @@ catch_except:;
do { \
H5TOOLS_PUSH_ERROR(H5tools_ERR_STACK_g, H5tools_ERR_CLS_g, H5E_tools_g, H5E_tools_min_id_g, \
__VA_ARGS__); \
H5_LEAVE(ret_val) \
H5_LEAVE(ret_val); \
} while (0)

#endif /* H5TOOLS_ERROR_H */

0 comments on commit bcd6fb0

Please sign in to comment.