-
-
Notifications
You must be signed in to change notification settings - Fork 265
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 usage of several HDfprintf format specifiers after HDfprintf removal #1324
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,7 +143,8 @@ H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t | |
/* Set the return value */ | ||
ret_value = fspace; | ||
#ifdef H5FS_DEBUG | ||
HDfprintf(stderr, "%s: fspace = %p, fspace->addr = %a\n", __func__, fspace, fspace->addr); | ||
HDfprintf(stderr, "%s: fspace = %p, fspace->addr = " H5_PRINTF_HADDR_FMT "\n", __func__, (void *)fspace, | ||
fspace->addr); | ||
#endif /* H5FS_DEBUG */ | ||
|
||
done: | ||
|
@@ -152,7 +153,7 @@ H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t | |
HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space header") | ||
|
||
#ifdef H5FS_DEBUG | ||
HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value); | ||
HDfprintf(stderr, "%s: Leaving, ret_value = %p\n", __func__, (void *)ret_value); | ||
#endif /* H5FS_DEBUG */ | ||
FUNC_LEAVE_NOAPI(ret_value) | ||
} /* H5FS_create() */ | ||
|
@@ -180,8 +181,8 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class | |
|
||
FUNC_ENTER_NOAPI(NULL) | ||
#ifdef H5FS_DEBUG | ||
HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %a, nclasses = %Zu\n", __func__, fs_addr, | ||
nclasses); | ||
HDfprintf(stderr, "%s: Opening free space manager, fs_addr = " H5_PRINTF_HADDR_FMT ", nclasses = %Zu\n", | ||
__func__, fs_addr, nclasses); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I intended for "%" PRIuHADDR to replace "%a" to be consistent with the C convention—PRIu64, etc. Let's deprecate H5_PRINTF_HADDR_FMT. |
||
#endif /* H5FS_DEBUG */ | ||
|
||
/* Check arguments. */ | ||
|
@@ -201,10 +202,11 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class | |
(fspace = (H5FS_t *)H5AC_protect(f, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) | ||
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, NULL, "unable to load free space header") | ||
#ifdef H5FS_DEBUG | ||
HDfprintf(stderr, "%s: fspace->sect_addr = %a\n", __func__, fspace->sect_addr); | ||
HDfprintf(stderr, "%s: fspace->sect_size = %Hu\n", __func__, fspace->sect_size); | ||
HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu\n", __func__, fspace->alloc_sect_size); | ||
HDfprintf(stderr, "%s: fspace->sinfo = %p\n", __func__, fspace->sinfo); | ||
HDfprintf(stderr, "%s: fspace->sect_addr = " H5_PRINTF_HADDR_FMT "\n", __func__, fspace->sect_addr); | ||
HDfprintf(stderr, "%s: fspace->sect_size = " H5_PRINTF_HSIZE_FMT "\n", __func__, fspace->sect_size); | ||
HDfprintf(stderr, "%s: fspace->alloc_sect_size = " H5_PRINTF_HSIZE_FMT "\n", __func__, | ||
fspace->alloc_sect_size); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Likewise, |
||
HDfprintf(stderr, "%s: fspace->sinfo = %p\n", __func__, (void *)fspace->sinfo); | ||
HDfprintf(stderr, "%s: fspace->rc = %u\n", __func__, fspace->rc); | ||
#endif /* H5FS_DEBUG */ | ||
|
||
|
@@ -248,7 +250,8 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) | |
|
||
FUNC_ENTER_NOAPI(FAIL) | ||
#ifdef H5FS_DEBUG | ||
HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %a\n", __func__, fs_addr); | ||
HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = " H5_PRINTF_HADDR_FMT "\n", __func__, | ||
fs_addr); | ||
#endif /* H5FS_DEBUG */ | ||
|
||
/* Check arguments. */ | ||
|
@@ -318,7 +321,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) | |
|
||
/* Delete serialized section storage, if there are any */ | ||
#ifdef H5FS_DEBUG | ||
HDfprintf(stderr, "%s: fspace->sect_addr = %a\n", __func__, fspace->sect_addr); | ||
HDfprintf(stderr, "%s: fspace->sect_addr = " H5_PRINTF_HADDR_FMT "\n", __func__, fspace->sect_addr); | ||
#endif /* H5FS_DEBUG */ | ||
if (fspace->serial_sect_count > 0) { | ||
unsigned sinfo_status = 0; /* Free space section info's status in the metadata cache */ | ||
|
@@ -404,20 +407,24 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) | |
HDassert(f); | ||
HDassert(fspace); | ||
#ifdef H5FS_DEBUG | ||
HDfprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %a, fspace->sinfo = %p\n", __func__, fspace, | ||
fspace->addr, fspace->sinfo); | ||
HDfprintf(stderr, | ||
"%s: Entering, fspace = %p, fspace->addr = " H5_PRINTF_HADDR_FMT ", fspace->sinfo = %p\n", | ||
__func__, (void *)fspace, fspace->addr, (void *)fspace->sinfo); | ||
#endif /* H5FS_DEBUG */ | ||
|
||
/* Check if section info is valid */ | ||
/* (i.e. the header "owns" the section info and it's not in the cache) */ | ||
if (fspace->sinfo) { | ||
#ifdef H5FS_DEBUG | ||
HDfprintf(stderr, | ||
"%s: fspace->tot_sect_count = %Hu, fspace->serial_sect_count = %Hu, fspace->sect_addr = " | ||
"%a, fspace->rc = %u\n", | ||
"%s: fspace->tot_sect_count = " H5_PRINTF_HSIZE_FMT | ||
", fspace->serial_sect_count = " H5_PRINTF_HSIZE_FMT | ||
", fspace->sect_addr = " H5_PRINTF_HADDR_FMT ", fspace->rc = %u\n", | ||
__func__, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc); | ||
HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", __func__, | ||
fspace->alloc_sect_size, fspace->sect_size); | ||
HDfprintf(stderr, | ||
"%s: fspace->alloc_sect_size = " H5_PRINTF_HSIZE_FMT | ||
", fspace->sect_size = " H5_PRINTF_HSIZE_FMT "\n", | ||
__func__, fspace->alloc_sect_size, fspace->sect_size); | ||
#endif /* H5FS_DEBUG */ | ||
/* If there are sections to serialize, update them */ | ||
/* (if the free space manager is persistent) */ | ||
|
@@ -708,8 +715,8 @@ H5FS__incr(H5FS_t *fspace) | |
|
||
FUNC_ENTER_PACKAGE | ||
#ifdef H5FS_DEBUG | ||
HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", __func__, fspace->addr, | ||
fspace->rc); | ||
HDfprintf(stderr, "%s: Entering, fpace->addr = " H5_PRINTF_HADDR_FMT ", fspace->rc = %u\n", __func__, | ||
fspace->addr, fspace->rc); | ||
#endif /* H5FS_DEBUG */ | ||
|
||
/* | ||
|
@@ -748,8 +755,8 @@ H5FS__decr(H5FS_t *fspace) | |
|
||
FUNC_ENTER_PACKAGE | ||
#ifdef H5FS_DEBUG | ||
HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", __func__, fspace->addr, | ||
fspace->rc); | ||
HDfprintf(stderr, "%s: Entering, fpace->addr = " H5_PRINTF_HADDR_FMT ", fspace->rc = %u\n", __func__, | ||
fspace->addr, fspace->rc); | ||
#endif /* H5FS_DEBUG */ | ||
|
||
/* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just delete?