Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few illegal pointer usages #5279

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/H5Shyper.c
Original file line number Diff line number Diff line change
Expand Up @@ -12334,7 +12334,7 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, bool *parti
if (diminfo->start >= clip_size) {
ret_value = 0;
if (partial)
partial = false;
*partial = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! Did you happen to see this issue with a tool or just from reading the code?

Copy link
Contributor Author

@TedLyngmo TedLyngmo Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually didn't see it before I put set (C_STANDARD 23) everywhere. :-) Then the compiler suddenly started barking.

} /* end if */
else {
/* Calculate index of first incomplete block */
Expand Down
8 changes: 4 additions & 4 deletions test/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -13800,12 +13800,12 @@ check_check_evictions_enabled_err(unsigned paged)

(cache_ptr->resize_ctl).incr_mode = H5C_incr__threshold;

result = H5C_get_evictions_enabled(cache_ptr, false);
result = H5C_set_evictions_enabled(cache_ptr, false);
TedLyngmo marked this conversation as resolved.
Show resolved Hide resolved

if (result == SUCCEED) {

pass = false;
failure_mssg = "H5C_get_evictions_enabled succeeded() 1.\n";
failure_mssg = "H5C_set_evictions_enabled succeeded() 1.\n";
}
else if (cache_ptr->evictions_enabled == true) {
}
Expand All @@ -13817,12 +13817,12 @@ check_check_evictions_enabled_err(unsigned paged)

(cache_ptr->resize_ctl).decr_mode = H5C_decr__threshold;

result = H5C_get_evictions_enabled(cache_ptr, false);
result = H5C_set_evictions_enabled(cache_ptr, false);

if (result == SUCCEED) {

pass = false;
failure_mssg = "H5C_get_evictions_enabled succeeded() 2.\n";
failure_mssg = "H5C_set_evictions_enabled succeeded() 2.\n";
}

(cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
Expand Down
Loading