Skip to content

Commit

Permalink
Automated addition of semicolon after HDONE_ERROR calls
Browse files Browse the repository at this point in the history
  • Loading branch information
seanm committed Jul 21, 2023
1 parent 7bfff9d commit 671ce1d
Show file tree
Hide file tree
Showing 169 changed files with 1,123 additions and 1,123 deletions.
16 changes: 8 additions & 8 deletions src/H5A.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ H5A__create_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
/* Cleanup on failure */
if (H5I_INVALID_HID == ret_value)
if (attr && H5VL_attr_close(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute")
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__create_common() */
Expand Down Expand Up @@ -278,7 +278,7 @@ H5Acreate_async(const char *app_file, const char *app_func, unsigned app_line, h
H5ARG_TRACE10(__func__, "*s*sIui*siiiii", app_file, app_func, app_line, loc_id, attr_name, type_id, space_id, acpl_id, aapl_id, es_id)) < 0) {
/* clang-format on */
if (H5I_dec_app_ref(ret_value) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID")
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID");
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
} /* end if */

Expand Down Expand Up @@ -427,7 +427,7 @@ H5Acreate_by_name_async(const char *app_file, const char *app_func, unsigned app
H5ARG_TRACE12(__func__, "*s*sIui*s*siiiiii", app_file, app_func, app_line, loc_id, obj_name, attr_name, type_id, space_id, acpl_id, aapl_id, lapl_id, es_id)) < 0) {
/* clang-format on */
if (H5I_dec_app_ref(ret_value) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID")
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID");
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
} /* end if */

Expand Down Expand Up @@ -471,7 +471,7 @@ H5A__open_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const ch
/* Cleanup on failure */
if (H5I_INVALID_HID == ret_value)
if (attr && H5VL_attr_close(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute")
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__open_common() */
Expand Down Expand Up @@ -590,7 +590,7 @@ H5Aopen_async(const char *app_file, const char *app_func, unsigned app_line, hid
H5ARG_TRACE7(__func__, "*s*sIui*sii", app_file, app_func, app_line, loc_id, attr_name, aapl_id, es_id)) < 0) {
/* clang-format on */
if (H5I_dec_app_ref(ret_value) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID")
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID");
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
} /* end if */

Expand Down Expand Up @@ -721,7 +721,7 @@ H5Aopen_by_name_async(const char *app_file, const char *app_func, unsigned app_l
H5ARG_TRACE9(__func__, "*s*sIui*s*siii", app_file, app_func, app_line, loc_id, obj_name, attr_name, aapl_id, lapl_id, es_id)) < 0) {
/* clang-format on */
if (H5I_dec_app_ref(ret_value) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID")
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID");
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
} /* end if */

Expand Down Expand Up @@ -861,7 +861,7 @@ H5Aopen_by_idx_async(const char *app_file, const char *app_func, unsigned app_li
H5ARG_TRACE11(__func__, "*s*sIui*sIiIohiii", app_file, app_func, app_line, loc_id, obj_name, idx_type, order, n, aapl_id, lapl_id, es_id)) < 0) {
/* clang-format on */
if (H5I_dec_app_ref(ret_value) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID")
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID");
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
} /* end if */

Expand Down Expand Up @@ -2288,7 +2288,7 @@ H5Aclose_async(const char *app_file, const char *app_func, unsigned app_line, hi

done:
if (connector && H5VL_conn_dec_rc(connector) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "can't decrement ref count on connector")
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "can't decrement ref count on connector");

FUNC_LEAVE_API(ret_value)
} /* H5Aclose_async() */
Expand Down
40 changes: 20 additions & 20 deletions src/H5AC.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
/* If currently logging, generate a message */
if (f->shared->cache->log_info->logging)
if (H5C_log_write_create_cache_msg(f->shared->cache, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

#ifdef H5_HAVE_PARALLEL
/* if there is a failure, try to tidy up the auxiliary structure */
Expand Down Expand Up @@ -533,7 +533,7 @@ H5AC_evict(H5F_t *f)
/* If currently logging, generate a message */
if (f->shared->cache->log_info->logging)
if (H5C_log_write_evict_cache_msg(f->shared->cache, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_evict() */
Expand Down Expand Up @@ -571,7 +571,7 @@ H5AC_expunge_entry(H5F_t *f, const H5AC_class_t *type, haddr_t addr, unsigned fl
/* If currently logging, generate a message */
if (f->shared->cache->log_info->logging)
if (H5C_log_write_expunge_entry_msg(f->shared->cache, addr, type->id, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_expunge_entry() */
Expand Down Expand Up @@ -623,7 +623,7 @@ H5AC_flush(H5F_t *f)
/* If currently logging, generate a message */
if (f->shared->cache->log_info->logging)
if (H5C_log_write_flush_cache_msg(f->shared->cache, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_flush() */
Expand Down Expand Up @@ -754,7 +754,7 @@ H5AC_insert_entry(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing,
if (f->shared->cache->log_info->logging)
if (H5C_log_write_insert_entry_msg(f->shared->cache, addr, type->id, flags,
((H5C_cache_entry_t *)thing)->size, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_insert_entry() */
Expand Down Expand Up @@ -835,7 +835,7 @@ H5AC_mark_entry_dirty(void *thing)
if (cache_ptr != NULL && cache_ptr->log_info != NULL)
if (cache_ptr->log_info->logging)
if (H5C_log_write_mark_entry_dirty_msg(cache_ptr, entry_ptr, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_dirty() */
Expand Down Expand Up @@ -885,7 +885,7 @@ H5AC_mark_entry_clean(void *thing)
if (cache_ptr != NULL && cache_ptr->log_info != NULL)
if (cache_ptr->log_info->logging)
if (H5C_log_write_mark_entry_clean_msg(cache_ptr, entry_ptr, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_clean() */
Expand Down Expand Up @@ -924,7 +924,7 @@ H5AC_mark_entry_unserialized(void *thing)
if (cache_ptr != NULL && cache_ptr->log_info != NULL)
if (cache_ptr->log_info->logging)
if (H5C_log_write_mark_unserialized_entry_msg(cache_ptr, entry_ptr, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_unserialized() */
Expand Down Expand Up @@ -962,7 +962,7 @@ H5AC_mark_entry_serialized(void *thing)
if (cache_ptr != NULL && cache_ptr->log_info != NULL)
if (cache_ptr->log_info->logging)
if (H5C_log_write_mark_serialized_entry_msg(cache_ptr, entry_ptr, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_serialized() */
Expand Down Expand Up @@ -1016,7 +1016,7 @@ H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t ne
/* If currently logging, generate a message */
if (f->shared->cache->log_info->logging)
if (H5C_log_write_move_entry_msg(f->shared->cache, old_addr, new_addr, type->id, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_move_entry() */
Expand Down Expand Up @@ -1056,7 +1056,7 @@ H5AC_pin_protected_entry(void *thing)
if (cache_ptr != NULL && cache_ptr->log_info != NULL)
if (cache_ptr->log_info->logging)
if (H5C_log_write_pin_entry_msg(cache_ptr, entry_ptr, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_pin_protected_entry() */
Expand Down Expand Up @@ -1213,7 +1213,7 @@ H5AC_create_flush_dependency(void *parent_thing, void *child_thing)
if (cache_ptr->log_info->logging)
if (H5C_log_write_create_fd_msg(cache_ptr, (H5AC_info_t *)parent_thing,
(H5AC_info_t *)child_thing, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_create_flush_dependency() */
Expand Down Expand Up @@ -1287,7 +1287,7 @@ H5AC_protect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *udata, unsi
if (f->shared->cache->log_info->logging)
if (H5C_log_write_protect_entry_msg(f->shared->cache, (H5AC_info_t *)thing, type->id, flags,
fake_ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, NULL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, NULL, "unable to emit log message");
}

FUNC_LEAVE_NOAPI(ret_value)
Expand Down Expand Up @@ -1381,7 +1381,7 @@ H5AC_resize_entry(void *thing, size_t new_size)
if (cache_ptr != NULL && cache_ptr->log_info != NULL)
if (cache_ptr->log_info->logging)
if (H5C_log_write_resize_entry_msg(cache_ptr, entry_ptr, new_size, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_resize_entry() */
Expand Down Expand Up @@ -1421,7 +1421,7 @@ H5AC_unpin_entry(void *thing)
if (cache_ptr != NULL && cache_ptr->log_info != NULL)
if (cache_ptr->log_info->logging)
if (H5C_log_write_unpin_entry_msg(cache_ptr, entry_ptr, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unpin_entry() */
Expand Down Expand Up @@ -1462,7 +1462,7 @@ H5AC_destroy_flush_dependency(void *parent_thing, void *child_thing)
if (cache_ptr->log_info->logging)
if (H5C_log_write_destroy_fd_msg(cache_ptr, (H5AC_info_t *)parent_thing,
(H5AC_info_t *)child_thing, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_destroy_flush_dependency() */
Expand Down Expand Up @@ -1553,7 +1553,7 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un
/* If we fail to log the deleted entry, push an error but still
* participate in a possible sync point ahead
*/
HDONE_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "H5AC__log_deleted_entry() failed")
HDONE_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "H5AC__log_deleted_entry() failed");
}
}
} /* end if */
Expand All @@ -1573,7 +1573,7 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un
/* If currently logging, generate a message */
if (f->shared->cache->log_info->logging)
if (H5C_log_write_unprotect_entry_msg(f->shared->cache, addr, type->id, flags, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unprotect() */
Expand Down Expand Up @@ -1828,7 +1828,7 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, const H5AC_cache_config_t *
/* If currently logging, generate a message */
if (cache_ptr->log_info->logging)
if (H5C_log_write_set_cache_config_msg(cache_ptr, config_ptr, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_set_cache_auto_resize_config() */
Expand Down Expand Up @@ -2532,7 +2532,7 @@ H5AC_remove_entry(void *_entry)
if (cache != NULL && cache->log_info != NULL)
if (cache->log_info->logging)
if (H5C_log_write_remove_entry_msg(cache, entry, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message");

FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_remove_entry() */
Expand Down
14 changes: 7 additions & 7 deletions src/H5ACmpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ H5AC__broadcast_candidate_list(H5AC_t *cache_ptr, unsigned *num_entries_ptr, had
*/
if (H5AC__copy_candidate_list_to_buffer(cache_ptr, &chk_num_entries, &haddr_buf_ptr) < 0) {
/* Push an error, but still participate in following MPI_Bcast */
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate buffer.")
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate buffer.");
}
assert(chk_num_entries == num_entries);
assert(haddr_buf_ptr != NULL);
Expand Down Expand Up @@ -409,7 +409,7 @@ H5AC__broadcast_clean_list(H5AC_t *cache_ptr)
buf_size = sizeof(haddr_t) * num_entries;
if (NULL == (addr_buf_ptr = (haddr_t *)H5MM_malloc(buf_size))) {
/* Push an error, but still participate in following MPI_Bcast */
HDONE_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for addr buffer")
HDONE_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for addr buffer");
}
else {
/* Set up user data for callback */
Expand All @@ -421,7 +421,7 @@ H5AC__broadcast_clean_list(H5AC_t *cache_ptr)
/* (Callback also removes the matching entries from the dirtied list) */
if (H5SL_free(aux_ptr->c_slist_ptr, H5AC__broadcast_clean_list_cb, &udata) < 0) {
/* Push an error, but still participate in following MPI_Bcast */
HDONE_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "Can't build address list for clean entries")
HDONE_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "Can't build address list for clean entries");
}
}

Expand Down Expand Up @@ -1396,7 +1396,7 @@ H5AC__receive_haddr_list(MPI_Comm mpi_comm, unsigned *num_entries_ptr, haddr_t *
buf_size = sizeof(haddr_t) * num_entries;
if (NULL == (haddr_buf_ptr = (haddr_t *)H5MM_malloc(buf_size))) {
/* Push an error, but still participate in following MPI_Bcast */
HDONE_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for haddr buffer")
HDONE_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for haddr buffer");
}

/* Now receive the list of candidate entries */
Expand Down Expand Up @@ -1740,7 +1740,7 @@ H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f)
*/
if (H5AC__construct_candidate_list(cache_ptr, aux_ptr, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) <
0)
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate list.")
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate list.");
}

/* propagate and apply candidate list -- all processes */
Expand Down Expand Up @@ -1833,7 +1833,7 @@ H5AC__rsp__p0_only__flush(H5F_t *f)
* in collective operations during following cache entry
* propagation
*/
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush.")
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush.");
}
else {
/* this code exists primarily for the test bed -- it allows us to
Expand Down Expand Up @@ -1955,7 +1955,7 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f)
* in collective operations during following cache entry
* propagation
*/
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_flush_to_min_clean() failed.")
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_flush_to_min_clean() failed.");
}
else {
/* this call exists primarily for the test code -- it is used
Expand Down
Loading

0 comments on commit 671ce1d

Please sign in to comment.