diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c index e4ac499584e..ca3864e98d7 100644 --- a/src/H5FAdblkpage.c +++ b/src/H5FAdblkpage.c @@ -147,7 +147,7 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts) FUNC_ENTER_PACKAGE #ifdef H5FA_DEBUG - HDfprintf(stderr, "%s: Called, addr = " H5_PRINTF_HADDR_FMT "\n", FUNC, addr); + HDfprintf(stderr, "%s: Called, addr = %" PRIuHADDR "\n", FUNC, addr); #endif /* H5FA_DEBUG */ /* Sanity check */ diff --git a/src/H5FDspace.c b/src/H5FDspace.c index fc9fb7b2b8d..1aebc63e3d2 100644 --- a/src/H5FDspace.c +++ b/src/H5FDspace.c @@ -148,7 +148,7 @@ H5FD__alloc_real(H5FD_t *file, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr FUNC_ENTER_PACKAGE #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, "%s: type = %u, size = " H5_PRINTF_HSIZE_FMT "\n", FUNC, (unsigned)type, size); + HDfprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", FUNC, (unsigned)type, size); #endif /* H5FD_ALLOC_DEBUG */ /* check args */ @@ -211,7 +211,7 @@ H5FD__alloc_real(H5FD_t *file, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr done: #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, "%s: ret_value = " H5_PRINTF_HADDR_FMT "\n", FUNC, ret_value); + HDfprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", FUNC, ret_value); #endif /* H5FD_ALLOC_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__alloc_real() */ @@ -287,8 +287,8 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) HDassert(size > 0); #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, "%s: type = %u, addr = " H5_PRINTF_HADDR_FMT ", size = " H5_PRINTF_HSIZE_FMT "\n", - FUNC, (unsigned)type, addr, size); + HDfprintf(stderr, "%s: type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", FUNC, + (unsigned)type, addr, size); #endif /* H5FD_ALLOC_DEBUG */ /* Sanity checking */ @@ -318,11 +318,11 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) eoa = file->cls->get_eoa(file, type); #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, "%s: eoa = " H5_PRINTF_HADDR_FMT "\n", FUNC, eoa); + HDfprintf(stderr, "%s: eoa = %" PRIuHADDR "\n", FUNC, eoa); #endif /* H5FD_ALLOC_DEBUG */ if (eoa == (addr + size)) { #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, "%s: Reducing file size to = " H5_PRINTF_HADDR_FMT "\n", FUNC, addr); + HDfprintf(stderr, "%s: Reducing file size to = %" PRIuHADDR "\n", FUNC, addr); #endif /* H5FD_ALLOC_DEBUG */ if (file->cls->set_eoa(file, type, addr) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "set end of space allocation request failed") @@ -331,10 +331,8 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) else { /* leak memory */ #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, - "%s: LEAKED MEMORY!!! type = %u, addr = " H5_PRINTF_HADDR_FMT - ", size = " H5_PRINTF_HSIZE_FMT "\n", - FUNC, (unsigned)type, addr, size); + HDfprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", + FUNC, (unsigned)type, addr, size); #endif /* H5FD_ALLOC_DEBUG */ } /* end else */ diff --git a/src/H5FS.c b/src/H5FS.c index a19c4c8f567..2abe45c83bf 100644 --- a/src/H5FS.c +++ b/src/H5FS.c @@ -146,7 +146,7 @@ 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 = " H5_PRINTF_HADDR_FMT "\n", FUNC, (void *)fspace, + HDfprintf(stderr, "%s: fspace = %p, fspace->addr = %" PRIuHADDR "\n", FUNC, (void *)fspace, fspace->addr); #endif /* H5FS_DEBUG */ @@ -184,8 +184,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 = " H5_PRINTF_HADDR_FMT ", nclasses = %Zu\n", - FUNC, fs_addr, nclasses); + HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %" PRIuHADDR ", nclasses = %Zu\n", FUNC, + fs_addr, nclasses); #endif /* H5FS_DEBUG */ /* Check arguments. */ @@ -205,10 +205,9 @@ 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 = " 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); + HDfprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", FUNC, fspace->sect_addr); + HDfprintf(stderr, "%s: fspace->sect_size = %" PRIuHSIZE "\n", FUNC, fspace->sect_size); + HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE "\n", FUNC, fspace->alloc_sect_size); HDfprintf(stderr, "%s: fspace->sinfo = %p\n", FUNC, (void *)fspace->sinfo); HDfprintf(stderr, "%s: fspace->rc = %u\n", FUNC, fspace->rc); #endif /* H5FS_DEBUG */ @@ -253,8 +252,7 @@ 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 = " H5_PRINTF_HADDR_FMT "\n", FUNC, - fs_addr); + HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %" PRIuHADDR "\n", FUNC, fs_addr); #endif /* H5FS_DEBUG */ /* Check arguments. */ @@ -324,7 +322,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 = " H5_PRINTF_HADDR_FMT "\n", FUNC, fspace->sect_addr); + HDfprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\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 */ @@ -410,9 +408,8 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) HDassert(f); HDassert(fspace); #ifdef H5FS_DEBUG - HDfprintf(stderr, - "%s: Entering, fspace = %p, fspace->addr = " H5_PRINTF_HADDR_FMT ", fspace->sinfo = %p\n", - FUNC, (void *)fspace, fspace->addr, (void *)fspace->sinfo); + HDfprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p\n", + FUNC, (void *)fspace, fspace->addr, (void *)fspace->sinfo); #endif /* H5FS_DEBUG */ /* Check if section info is valid */ @@ -420,13 +417,11 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) if (fspace->sinfo) { #ifdef H5FS_DEBUG HDfprintf(stderr, - "%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", + "%s: fspace->tot_sect_count = %" PRIuHSIZE ", fspace->serial_sect_count = %" PRIuHSIZE + ", fspace->sect_addr = %" PRIuHADDR ", 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 = " H5_PRINTF_HSIZE_FMT - ", fspace->sect_size = " H5_PRINTF_HSIZE_FMT "\n", + "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n", FUNC, fspace->alloc_sect_size, fspace->sect_size); #endif /* H5FS_DEBUG */ /* If there are sections to serialize, update them */ @@ -716,8 +711,8 @@ H5FS__incr(H5FS_t *fspace) FUNC_ENTER_PACKAGE #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Entering, fpace->addr = " H5_PRINTF_HADDR_FMT ", fspace->rc = %u\n", FUNC, - fspace->addr, fspace->rc); + HDfprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", FUNC, fspace->addr, + fspace->rc); #endif /* H5FS_DEBUG */ /* @@ -756,8 +751,8 @@ H5FS__decr(H5FS_t *fspace) FUNC_ENTER_PACKAGE #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Entering, fpace->addr = " H5_PRINTF_HADDR_FMT ", fspace->rc = %u\n", FUNC, - fspace->addr, fspace->rc); + HDfprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", FUNC, fspace->addr, + fspace->rc); #endif /* H5FS_DEBUG */ /* diff --git a/src/H5FSsection.c b/src/H5FSsection.c index 02abbbb8d83..00301fd6547 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -123,7 +123,7 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace) HDassert(f); HDassert(fspace); #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: fspace->addr = " H5_PRINTF_HADDR_FMT "\n", FUNC, fspace->addr); + HDfprintf(stderr, "%s: fspace->addr = %" PRIuHADDR "\n", FUNC, fspace->addr); #endif /* H5FS_SINFO_DEBUG */ /* Allocate the free space header */ @@ -136,8 +136,7 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace) sinfo->sect_off_size = (fspace->max_sect_addr + 7) / 8; sinfo->sect_len_size = H5VM_limit_enc_size((uint64_t)fspace->max_sect_size); #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: fspace->max_sect_size = " H5_PRINTF_HSIZE_FMT "\n", FUNC, - fspace->max_sect_size); + HDfprintf(stderr, "%s: fspace->max_sect_size = %" PRIuHSIZE "\n", FUNC, fspace->max_sect_size); HDfprintf(stderr, "%s: fspace->max_sect_addr = %u\n", FUNC, fspace->max_sect_addr); HDfprintf(stderr, "%s: sinfo->nbins = %u\n", FUNC, sinfo->nbins); HDfprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n", FUNC, @@ -202,13 +201,11 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode) #ifdef H5FS_SINFO_DEBUG HDfprintf(stderr, - "%s: Called, fspace->addr = " H5_PRINTF_HADDR_FMT - ", fspace->sinfo = %p, fspace->sect_addr = " H5_PRINTF_HADDR_FMT "\n", + "%s: Called, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR + "\n", FUNC, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr); - 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); + HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n", + FUNC, fspace->alloc_sect_size, fspace->sect_size); #endif /* H5FS_SINFO_DEBUG */ /* Check arguments. */ @@ -256,9 +253,8 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode) HDassert(H5F_addr_defined(fspace->addr)); #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, - "%s: Reading in existing sections, fspace->sect_addr = " H5_PRINTF_HADDR_FMT "\n", - FUNC, fspace->sect_addr); + HDfprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %" PRIuHADDR "\n", + FUNC, fspace->sect_addr); #endif /* H5FS_SINFO_DEBUG */ /* Protect the free space sections */ cache_udata.f = f; @@ -296,13 +292,11 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode) done: #ifdef H5FS_SINFO_DEBUG HDfprintf(stderr, - "%s: Leaving, fspace->addr = " H5_PRINTF_HADDR_FMT - ", fspace->sinfo = %p, fspace->sect_addr = " H5_PRINTF_HADDR_FMT "\n", + "%s: Leaving, fspace->addr = %" PRIuHADDR + ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR "\n", FUNC, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr); - 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); + HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n", + FUNC, fspace->alloc_sect_size, fspace->sect_size); #endif /* H5FS_SINFO_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* H5FS__sinfo_lock() */ @@ -342,17 +336,15 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) FUNC_ENTER_STATIC #ifdef H5FS_SINFO_DEBUG HDfprintf(stderr, - "%s: Called, modified = %d, fspace->addr = " H5_PRINTF_HADDR_FMT - ", fspace->sect_addr = " H5_PRINTF_HADDR_FMT "\n", + "%s: Called, modified = %d, fspace->addr = %" PRIuHADDR ", fspace->sect_addr = %" PRIuHADDR + "\n", FUNC, modified, fspace->addr, fspace->sect_addr); HDfprintf( stderr, "%s: fspace->sinfo_lock_count = %u, fspace->sinfo_modified = %d, fspace->sinfo_protected = %d\n", FUNC, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected); - 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); + HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n", + FUNC, fspace->alloc_sect_size, fspace->sect_size); #endif /* H5FS_SINFO_DEBUG */ /* Check arguments. */ @@ -504,8 +496,8 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) #ifdef H5FS_SINFO_DEBUG HDfprintf(stderr, - "%s: Freeing section info on disk, old_sect_addr = " H5_PRINTF_HADDR_FMT - ", old_alloc_sect_size = " H5_PRINTF_HSIZE_FMT "\n", + "%s: Freeing section info on disk, old_sect_addr = %" PRIuHADDR + ", old_alloc_sect_size = %" PRIuHSIZE "\n", FUNC, old_sect_addr, old_alloc_sect_size); #endif /* H5FS_SINFO_DEBUG */ /* Release space for section info in file */ @@ -1358,8 +1350,8 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag FUNC_ENTER_NOAPI(FAIL) #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: *sect = {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT ", %u, %s}\n", FUNC, - sect->addr, sect->size, sect->type, + HDfprintf(stderr, "%s: *sect = {%" PRIuHADDR ", %" PRIuHSIZE ", %u, %s}\n", FUNC, sect->addr, + sect->size, sect->type, (sect->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED")); #endif /* H5FS_SINFO_DEBUG */ @@ -1400,7 +1392,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space section into skip list") #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: fspace->tot_space = " H5_PRINTF_HSIZE_FMT "\n", FUNC, fspace->tot_space); + HDfprintf(stderr, "%s: fspace->tot_space = %" PRIuHSIZE "\n", FUNC, fspace->tot_space); #endif /* H5FS_SINFO_DEBUG */ /* Mark free space sections as changed */ /* (if adding sections while deserializing sections, don't set the flag) */ @@ -1445,10 +1437,8 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize FUNC_ENTER_NOAPI(FAIL) #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, - "%s: addr = " H5_PRINTF_HADDR_FMT ", size = " H5_PRINTF_HSIZE_FMT - ", extra_requested = " H5_PRINTF_HSIZE_FMT "\n", - FUNC, addr, size, extra_requested); + HDfprintf(stderr, "%s: addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", extra_requested = %" PRIuHSIZE "\n", + FUNC, addr, size, extra_requested); #endif /* H5FS_SINFO_DEBUG */ /* Check arguments. */ @@ -1460,12 +1450,10 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize /* Check for any sections on free space list */ #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: fspace->tot_sect_count = " H5_PRINTF_HSIZE_FMT "\n", FUNC, - fspace->tot_sect_count); - HDfprintf(stderr, "%s: fspace->serial_sect_count = " H5_PRINTF_HSIZE_FMT "\n", FUNC, + HDfprintf(stderr, "%s: fspace->tot_sect_count = %" PRIuHSIZE "\n", FUNC, fspace->tot_sect_count); + HDfprintf(stderr, "%s: fspace->serial_sect_count = %" PRIuHSIZE "\n", FUNC, fspace->serial_sect_count); - HDfprintf(stderr, "%s: fspace->ghost_sect_count = " H5_PRINTF_HSIZE_FMT "\n", FUNC, - fspace->ghost_sect_count); + HDfprintf(stderr, "%s: fspace->ghost_sect_count = %" PRIuHSIZE "\n", FUNC, fspace->ghost_sect_count); #endif /* H5FS_SINFO_DEBUG */ if (fspace->tot_sect_count > 0) { H5FS_section_info_t *sect; /* Temporary free space section */ diff --git a/src/H5MF.c b/src/H5MF.c index 5fb19bd9637..4381153b755 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -654,8 +654,8 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, - "%s: adding node, node->sect_info.addr = " H5_PRINTF_HADDR_FMT - ", node->sect_info.size = " H5_PRINTF_HSIZE_FMT "\n", + "%s: adding node, node->sect_info.addr = %" PRIuHADDR ", node->sect_info.size = %" PRIuHSIZE + "\n", FUNC, node->sect_info.addr, node->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Add the section */ @@ -736,8 +736,8 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h node->sect_info.size -= size; #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: re-adding node, node->sect_info.size = " H5_PRINTF_HSIZE_FMT "\n", - FUNC, node->sect_info.size); + HDfprintf(stderr, "%s: re-adding node, node->sect_info.size = %" PRIuHSIZE "\n", FUNC, + node->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Re-add the section to the free-space manager */ @@ -780,8 +780,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, HADDR_UNDEF) #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: alloc_type = %u, size = " H5_PRINTF_HSIZE_FMT "\n", FUNC, (unsigned)alloc_type, - size); + HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", FUNC, (unsigned)alloc_type, size); #endif /* H5MF_ALLOC_DEBUG */ /* check arguments */ @@ -854,8 +853,8 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) H5AC_set_ring(orig_ring, NULL); #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Leaving: ret_value = " H5_PRINTF_HADDR_FMT ", size = " H5_PRINTF_HSIZE_FMT "\n", - FUNC, ret_value, size); + HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", FUNC, ret_value, + size); #endif /* H5MF_ALLOC_DEBUG */ #ifdef H5MF_ALLOC_DEBUG_DUMP H5MF__sects_dump(f, stderr); @@ -895,8 +894,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) FUNC_ENTER_STATIC #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: alloc_type = %u, size = " H5_PRINTF_HSIZE_FMT "\n", FUNC, (unsigned)alloc_type, - size); + HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", FUNC, (unsigned)alloc_type, size); #endif /* H5MF_ALLOC_DEBUG */ H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &ptype); @@ -993,8 +991,8 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) done: #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Leaving: ret_value = " H5_PRINTF_HADDR_FMT ", size = " H5_PRINTF_HSIZE_FMT "\n", - FUNC, ret_value, size); + HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", FUNC, ret_value, + size); #endif /* H5MF_ALLOC_DEBUG */ #ifdef H5MF_ALLOC_DEBUG_DUMP H5MF__sects_dump(f, stderr); @@ -1040,7 +1038,7 @@ H5MF_alloc_tmp(H5F_t *f, hsize_t size) FUNC_ENTER_NOAPI(HADDR_UNDEF) #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: size = " H5_PRINTF_HSIZE_FMT "\n", FUNC, size); + HDfprintf(stderr, "%s: size = %" PRIuHSIZE "\n", FUNC, size); #endif /* H5MF_ALLOC_DEBUG */ /* check args */ @@ -1092,10 +1090,8 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, - "%s: Entering - alloc_type = %u, addr = " H5_PRINTF_HADDR_FMT ", size = " H5_PRINTF_HSIZE_FMT - "\n", - FUNC, (unsigned)alloc_type, addr, size); + HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", + FUNC, (unsigned)alloc_type, addr, size); #endif /* H5MF_ALLOC_DEBUG */ /* check arguments */ @@ -1144,7 +1140,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) * space is at the end of the file */ #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: fs_addr = " H5_PRINTF_HADDR_FMT "\n", FUNC, f->shared->fs_addr[fs_type]); + HDfprintf(stderr, "%s: fs_addr = %" PRIuHADDR "\n", FUNC, f->shared->fs_addr[fs_type]); #endif /* H5MF_ALLOC_DEBUG_MORE */ if (!H5F_addr_defined(f->shared->fs_addr[fs_type])) { htri_t status; /* "can absorb" status for section into */ @@ -1161,8 +1157,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) else if (size < f->shared->fs_threshold) { #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, - "%s: dropping addr = " H5_PRINTF_HADDR_FMT ", size = " H5_PRINTF_HSIZE_FMT - ", on the floor!\n", + "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n", FUNC, addr, size); #endif /* H5MF_ALLOC_DEBUG_MORE */ HGOTO_DONE(SUCCEED) @@ -1180,10 +1175,8 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) */ if (f->shared->fs_state[fs_type] == H5F_FS_STATE_DELETING || !H5F_HAVE_FREE_SPACE_MANAGER(f)) { #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, - "%s: dropping addr = " H5_PRINTF_HADDR_FMT ", size = " H5_PRINTF_HSIZE_FMT - ", on the floor!\n", - FUNC, addr, size); + HDfprintf(stderr, "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n", + FUNC, addr, size); #endif /* H5MF_ALLOC_DEBUG_MORE */ HGOTO_DONE(SUCCEED) } /* end if */ @@ -1293,8 +1286,8 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, - "%s: Entering: alloc_type = %u, addr = " H5_PRINTF_HADDR_FMT ", size = " H5_PRINTF_HSIZE_FMT - ", extra_requested = " H5_PRINTF_HSIZE_FMT "\n", + "%s: Entering: alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE + ", extra_requested = %" PRIuHSIZE "\n", FUNC, (unsigned)alloc_type, addr, size, extra_requested); #endif /* H5MF_ALLOC_DEBUG */ @@ -1470,10 +1463,8 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, - "%s: Entering - alloc_type = %u, addr = " H5_PRINTF_HADDR_FMT ", size = " H5_PRINTF_HSIZE_FMT - "\n", - FUNC, (unsigned)alloc_type, addr, size); + HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", + FUNC, (unsigned)alloc_type, addr, size); #endif /* H5MF_ALLOC_DEBUG */ /* check arguments */ @@ -1609,10 +1600,9 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type) HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES); #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf( - stderr, - "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = " H5_PRINTF_HADDR_FMT "\n", - FUNC, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]); + HDfprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n", + FUNC, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type, + f->shared->fs_addr[type]); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* If the free space manager for this type is open, close it */ @@ -1621,10 +1611,9 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager") #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf( - stderr, - "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = " H5_PRINTF_HADDR_FMT "\n", - FUNC, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]); + HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n", + FUNC, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type, + f->shared->fs_addr[type]); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* If there is free space manager info for this type, delete it */ diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c index ad8ba47003a..df033353333 100644 --- a/src/H5MFaggr.c +++ b/src/H5MFaggr.c @@ -92,8 +92,7 @@ H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) FUNC_ENTER_NOAPI(HADDR_UNDEF) #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, "%s: alloc_type = %u, size = " H5_PRINTF_HSIZE_FMT "\n", FUNC, (unsigned)alloc_type, - size); + HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", FUNC, (unsigned)alloc_type, size); #endif /* H5MF_AGGR_DEBUG */ /* check arguments */ @@ -121,8 +120,8 @@ H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) done: #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, "%s: Leaving: ret_value = " H5_PRINTF_HADDR_FMT ", size = " H5_PRINTF_HSIZE_FMT "\n", - FUNC, ret_value, size); + HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", FUNC, ret_value, + size); #endif /* H5MF_AGGR_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) @@ -152,7 +151,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F FUNC_ENTER_STATIC #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, "%s: type = %u, size = " H5_PRINTF_HSIZE_FMT "\n", FUNC, (unsigned)type, size); + HDfprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", FUNC, (unsigned)type, size); #endif /* H5MF_AGGR_DEBUG */ /* check args */ @@ -201,10 +200,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F H5FD_mem_t alloc_type, other_alloc_type; /* Current aggregator & 'other' aggregator types */ #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, - "%s: aggr = {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT ", " H5_PRINTF_HSIZE_FMT - "}\n", - FUNC, aggr->addr, aggr->tot_size, aggr->size); + HDfprintf(stderr, "%s: aggr = {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", FUNC, + aggr->addr, aggr->tot_size, aggr->size); #endif /* H5MF_AGGR_DEBUG */ /* Turn off alignment if allocation < threshold */ @@ -392,7 +389,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F done: #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, "%s: ret_value = " H5_PRINTF_HADDR_FMT "\n", FUNC, ret_value); + HDfprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", FUNC, ret_value); #endif /* H5MF_AGGR_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__aggr_alloc() */ @@ -542,8 +539,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr)) { #ifdef H5MF_AGGR_DEBUG HDfprintf(stderr, - "%s: section {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT - "} adjoins aggr = {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT "}\n", + "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins aggr = {%" PRIuHADDR + ", %" PRIuHSIZE "}\n", "H5MF__aggr_can_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr, aggr->size); #endif /* H5MF_AGGR_DEBUG */ @@ -595,8 +592,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F if (H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)) { #ifdef H5MF_AGGR_DEBUG HDfprintf(stderr, - "%s: aggr {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT - "} adjoins front of section = {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT "}\n", + "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of section = {%" PRIuHADDR + ", %" PRIuHSIZE "}\n", "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr, sect->sect_info.size); #endif /* H5MF_AGGR_DEBUG */ @@ -609,8 +606,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F #ifdef H5MF_AGGR_DEBUG HDfprintf(stderr, - "%s: aggr {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT - "} adjoins end of section = {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT "}\n", + "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of section = {%" PRIuHADDR + ", %" PRIuHSIZE "}\n", "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr, sect->sect_info.size); #endif /* H5MF_AGGR_DEBUG */ @@ -629,8 +626,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F if (H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)) { #ifdef H5MF_AGGR_DEBUG HDfprintf(stderr, - "%s: section {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT - "} adjoins front of aggr = {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT "}\n", + "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of aggr = {%" PRIuHADDR + ", %" PRIuHSIZE "}\n", "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr, aggr->size); #endif /* H5MF_AGGR_DEBUG */ @@ -649,8 +646,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F #ifdef H5MF_AGGR_DEBUG HDfprintf(stderr, - "%s: section {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT - "} adjoins end of aggr = {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT "}\n", + "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of aggr = {%" PRIuHADDR + ", %" PRIuHSIZE "}\n", "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr, aggr->size); #endif /* H5MF_AGGR_DEBUG */ @@ -738,8 +735,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F tmp_addr = aggr->addr; tmp_size = aggr->size; #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, "%s: tmp_addr = " H5_PRINTF_HADDR_FMT ", tmp_size = " H5_PRINTF_HSIZE_FMT "\n", - FUNC, tmp_addr, tmp_size); + HDfprintf(stderr, "%s: tmp_addr = %" PRIuHADDR ", tmp_size = %" PRIuHSIZE "\n", FUNC, + tmp_addr, tmp_size); #endif /* H5MF_AGGR_DEBUG */ /* Reset aggregator block information */ diff --git a/src/H5MFsection.c b/src/H5MFsection.c index 2d0fae6f8f3..a567881cb62 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -473,8 +473,7 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) udata->shrink = H5MF_SHRINK_EOA; #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, - "%s: section {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT - "}, shrinks file, eoa = " H5_PRINTF_HADDR_FMT "\n", + "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n", FUNC, sect->sect_info.addr, sect->sect_info.size, eoa); #endif /* H5MF_ALLOC_DEBUG_MORE */ @@ -499,8 +498,7 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) udata->aggr = &(udata->f->shared->meta_aggr); #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, - "%s: section {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT - "}, adjoins metadata aggregator\n", + "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins metadata aggregator\n", FUNC, sect->sect_info.addr, sect->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ @@ -522,8 +520,7 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) udata->aggr = &(udata->f->shared->sdata_aggr); #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, - "%s: section {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT - "}, adjoins small data aggregator\n", + "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins small data aggregator\n", FUNC, sect->sect_info.addr, sect->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ @@ -631,7 +628,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) FUNC_ENTER_STATIC #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Entering, section {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT "}\n", FUNC, + HDfprintf(stderr, "%s: Entering, section {%" PRIuHADDR ", %" PRIuHSIZE "}\n", FUNC, (*sect)->sect_info.addr, (*sect)->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ @@ -659,8 +656,8 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) else if (prem <= H5F_PGEND_META_THRES(udata->f)) { (*sect)->sect_info.size += prem; #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: section is adjusted {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT "}\n", - FUNC, (*sect)->sect_info.addr, (*sect)->sect_info.size); + HDfprintf(stderr, "%s: section is adjusted {%" PRIuHADDR ", %" PRIuHSIZE "}\n", FUNC, + (*sect)->sect_info.addr, (*sect)->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ @@ -901,8 +898,7 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata) udata->shrink = H5MF_SHRINK_EOA; #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, - "%s: section {" H5_PRINTF_HADDR_FMT ", " H5_PRINTF_HSIZE_FMT - "}, shrinks file, eoa = " H5_PRINTF_HADDR_FMT "\n", + "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n", FUNC, sect->sect_info.addr, sect->sect_info.size, eoa); #endif /* H5MF_ALLOC_DEBUG_MORE */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index c5980eb7221..a404757125e 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -295,14 +295,11 @@ H5S__hyper_print_spans_helper(FILE *f, const H5S_hyper_span_t *span, unsigned de FUNC_ENTER_STATIC_NOERR while (span) { - HDfprintf(f, - "%s: %*sdepth=%u, span=%p, (" H5_PRINTF_HSIZE_FMT ", " H5_PRINTF_HSIZE_FMT "), next=%p\n", - FUNC, depth * 2, "", depth, (void *)span, span->low, span->high, (void *)span->next); + HDfprintf(f, "%s: %*sdepth=%u, span=%p, (%" PRIuHSIZE ", %" PRIuHSIZE "), next=%p\n", FUNC, + depth * 2, "", depth, (void *)span, span->low, span->high, (void *)span->next); if (span->down) { - HDfprintf(f, - "%s: %*sspans=%p, count=%u, bounds[0]={" H5_PRINTF_HSIZE_FMT ", " H5_PRINTF_HSIZE_FMT - "}, head=%p\n", - FUNC, (depth + 1) * 2, "", (void *)span->down, span->down->count, + HDfprintf(f, "%s: %*sspans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n", + FUNC, (depth + 1) * 2, "", (void *)span->down, span->down->count, span->down->low_bounds[0], span->down->high_bounds[0], (void *)span->down->head); H5S__hyper_print_spans_helper(f, span->down->head, depth + 1); } /* end if */ @@ -318,10 +315,8 @@ H5S__hyper_print_spans(FILE *f, const H5S_hyper_span_info_t *span_lst) FUNC_ENTER_STATIC_NOERR if (span_lst != NULL) { - HDfprintf(f, - "%s: spans=%p, count=%u, bounds[0]={" H5_PRINTF_HSIZE_FMT ", " H5_PRINTF_HSIZE_FMT - "}, head=%p\n", - FUNC, (void *)span_lst, span_lst->count, span_lst->low_bounds[0], + HDfprintf(f, "%s: spans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n", + FUNC, (void *)span_lst, span_lst->count, span_lst->low_bounds[0], span_lst->high_bounds[0], (void *)span_lst->head); H5S__hyper_print_spans_helper(f, span_lst->head, 0); } /* end if */ @@ -349,16 +344,16 @@ H5S__hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, cons if (dinfo != NULL) { HDfprintf(f, "%s: %s: start=[", FUNC, field); for (u = 0; u < ndims; u++) - HDfprintf(f, H5_PRINTF_HSIZE_FMT "%s", dinfo[u].start, (u < (ndims - 1) ? ", " : "]\n")); + HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].start, (u < (ndims - 1) ? ", " : "]\n")); HDfprintf(f, "%s: %s: stride=[", FUNC, field); for (u = 0; u < ndims; u++) - HDfprintf(f, H5_PRINTF_HSIZE_FMT "%s", dinfo[u].stride, (u < (ndims - 1) ? ", " : "]\n")); + HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].stride, (u < (ndims - 1) ? ", " : "]\n")); HDfprintf(f, "%s: %s: count=[", FUNC, field); for (u = 0; u < ndims; u++) - HDfprintf(f, H5_PRINTF_HSIZE_FMT "%s", dinfo[u].count, (u < (ndims - 1) ? ", " : "]\n")); + HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].count, (u < (ndims - 1) ? ", " : "]\n")); HDfprintf(f, "%s: %s: block=[", FUNC, field); for (u = 0; u < ndims; u++) - HDfprintf(f, H5_PRINTF_HSIZE_FMT "%s", dinfo[u].block, (u < (ndims - 1) ? ", " : "]\n")); + HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].block, (u < (ndims - 1) ? ", " : "]\n")); } /* end if */ else HDfprintf(f, "%s: %s==NULL\n", FUNC, field); @@ -425,23 +420,23 @@ H5S__hyper_print_spans_dfs(FILE *f, const H5S_hyper_span_info_t *span_lst, unsig HDfprintf(f, "\t"); HDfprintf(f, "low_bounds=["); for (u = 0; u < dims - 1; u++) - HDfprintf(f, H5_PRINTF_HSIZE_FMT ",", span_lst->low_bounds[u]); - HDfprintf(f, H5_PRINTF_HSIZE_FMT "]\n", span_lst->low_bounds[dims - 1]); + HDfprintf(f, "%" PRIuHSIZE ",", span_lst->low_bounds[u]); + HDfprintf(f, "%" PRIuHSIZE "]\n", span_lst->low_bounds[dims - 1]); for (u = 0; u < depth; u++) HDfprintf(f, "\t"); HDfprintf(f, "high_bounds=["); for (u = 0; u < dims - 1; u++) - HDfprintf(f, H5_PRINTF_HSIZE_FMT ",", span_lst->high_bounds[u]); - HDfprintf(f, H5_PRINTF_HSIZE_FMT "]\n", span_lst->high_bounds[dims - 1]); + HDfprintf(f, "%" PRIuHSIZE ",", span_lst->high_bounds[u]); + HDfprintf(f, "%" PRIuHSIZE "]\n", span_lst->high_bounds[dims - 1]); cur_elem = span_lst->head; elem_idx = 0; while (cur_elem) { for (u = 0; u < depth; u++) HDfprintf(f, "\t"); - HDfprintf(f, "ELEM[%u]: ptr=%p, low=" H5_PRINTF_HSIZE_FMT ", high=" H5_PRINTF_HSIZE_FMT ", down=%p\n", - elem_idx++, (void *)cur_elem, cur_elem->low, cur_elem->high, (void *)cur_elem->down); + HDfprintf(f, "ELEM[%u]: ptr=%p, low=%" PRIuHSIZE ", high=%" PRIuHSIZE ", down=%p\n", elem_idx++, + (void *)cur_elem, cur_elem->low, cur_elem->high, (void *)cur_elem->down); if (cur_elem->down) H5S__hyper_print_spans_dfs(f, cur_elem->down, depth + 1, dims); cur_elem = cur_elem->next; @@ -489,26 +484,25 @@ H5S__hyper_print_space_dfs(FILE *f, const H5S_t *space) HDfprintf(f, " low_bounds=["); if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) { for (u = 0; u < dims - 1; u++) - HDfprintf(f, H5_PRINTF_HSIZE_FMT ",", space->select.sel_info.hslab->diminfo.low_bounds[u]); - HDfprintf(f, H5_PRINTF_HSIZE_FMT "]\n", space->select.sel_info.hslab->diminfo.low_bounds[dims - 1]); + HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.low_bounds[u]); + HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.low_bounds[dims - 1]); } /* end if */ else { for (u = 0; u < dims - 1; u++) - HDfprintf(f, H5_PRINTF_HSIZE_FMT ",", space->select.sel_info.hslab->span_lst->low_bounds[u]); - HDfprintf(f, H5_PRINTF_HSIZE_FMT "]\n", space->select.sel_info.hslab->span_lst->low_bounds[dims - 1]); + HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->low_bounds[u]); + HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->low_bounds[dims - 1]); } /* end else */ HDfprintf(f, " high_bounds=["); if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) { for (u = 0; u < dims - 1; u++) - HDfprintf(f, H5_PRINTF_HSIZE_FMT ",", space->select.sel_info.hslab->diminfo.high_bounds[u]); - HDfprintf(f, H5_PRINTF_HSIZE_FMT "]\n", space->select.sel_info.hslab->diminfo.high_bounds[dims - 1]); + HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.high_bounds[u]); + HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.high_bounds[dims - 1]); } /* end if */ else { for (u = 0; u < dims - 1; u++) - HDfprintf(f, H5_PRINTF_HSIZE_FMT ",", space->select.sel_info.hslab->span_lst->high_bounds[u]); - HDfprintf(f, H5_PRINTF_HSIZE_FMT "]\n", - space->select.sel_info.hslab->span_lst->high_bounds[dims - 1]); + HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->high_bounds[u]); + HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->high_bounds[dims - 1]); } /* end else */ /* Print out diminfo, if it's valid */ diff --git a/src/H5VLnative_token.c b/src/H5VLnative_token.c index 65591c7e83e..0be796aa4aa 100644 --- a/src/H5VLnative_token.c +++ b/src/H5VLnative_token.c @@ -108,7 +108,7 @@ H5VL__native_token_to_str(void *obj, H5I_type_t obj_type, const H5O_token_t *tok if (NULL == (*token_str = H5MM_malloc(addr_ndigits + 1))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate buffer for token string") - HDsnprintf(*token_str, addr_ndigits + 1, H5_PRINTF_HADDR_FMT, addr); + HDsnprintf(*token_str, addr_ndigits + 1, "%" PRIuHADDR, addr); done: FUNC_LEAVE_NOAPI(ret_value) @@ -135,7 +135,7 @@ H5VL__native_str_to_token(void *obj, H5I_type_t obj_type, const char *token_str, /* Check parameters */ HDassert(token_str); - HDsscanf(token_str, H5_PRINTF_HADDR_FMT, &addr); + HDsscanf(token_str, "%" PRIuHADDR, &addr); if (H5VL_native_addr_to_token(obj, obj_type, addr, token) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't convert address to object token") diff --git a/src/H5public.h b/src/H5public.h index 0e3616a01d7..c0541b1dc2c 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -331,7 +331,6 @@ H5_GCC_DIAG_ON("long-long") #define PRIXHSIZE H5_PRINTF_LL_WIDTH "X" #define H5_SIZEOF_HSIZE_T H5_SIZEOF_LONG_LONG #define H5_SIZEOF_HSSIZE_T H5_SIZEOF_LONG_LONG -#define H5_PRINTF_HSIZE_FMT "%" PRIuHSIZE #define HSIZE_UNDEF ULLONG_MAX #else #error "nothing appropriate for hsize_t"