From fb3e6b4d8c475e6bcd05c8b111c135e196c25e3c Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 7 May 2005 14:39:26 -0500 Subject: [svn-r10737] Purpose: Code cleanup Description: Clean up some compiler warnings Platforms tested: FreeBSD 4.11 (sleipnir) h5committest --- config/freebsd | 11 ++++++----- hl/tools/gif2h5/readhdf.c | 4 ++-- hl/tools/gif2h5/writehdf.c | 3 --- src/H5.c | 12 ++++++------ src/H5A.c | 4 ++-- src/H5B.c | 12 ++++++------ src/H5Bpkg.h | 2 +- src/H5Dprivate.h | 2 +- src/H5F.c | 21 ++++++++++----------- src/H5Fpkg.h | 10 +++++----- src/H5G.c | 2 +- src/H5Gpkg.h | 2 +- src/H5Opkg.h | 2 +- src/H5P.c | 20 ++++++++++---------- test/bittests.c | 14 +++++++------- test/dsets.c | 2 +- test/testmeta.c | 6 +++--- tools/gifconv/readhdf.c | 4 ++-- tools/gifconv/writehdf.c | 3 --- tools/lib/h5tools_str.c | 14 ++++---------- 20 files changed, 69 insertions(+), 81 deletions(-) diff --git a/config/freebsd b/config/freebsd index 4619beb..911a9aa 100644 --- a/config/freebsd +++ b/config/freebsd @@ -11,16 +11,17 @@ if test "X-" = "X-$CC"; then CC_BASENAME=gcc fi -# Add "_POSIX_C_SOURCE" define to cpp flags, to quiet warnings +# Add "_XOPEN_SOURCE" define to cpp flags, to quiet warnings # from /usr/include/sys/cdefs.h -CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=1" +CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600" -# Figure out compiler flags +# Figure out C compiler flags . $srcdir/config/gnu-flags # Special setup to use pthread support if enable-threadsafe is on. # Works with static executable only. if test "X-" != "X-$enable_threadsafe"; then - CFLAGS="$CFLAGS -D_THREAD_SAFE" - LDFLAGS="$LDFLAGS -pthread" + CFLAGS="$CFLAGS -D_THREAD_SAFE" + CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE" + LDFLAGS="$LDFLAGS -pthread" fi diff --git a/hl/tools/gif2h5/readhdf.c b/hl/tools/gif2h5/readhdf.c index 4b05ad9..2720d4d 100644 --- a/hl/tools/gif2h5/readhdf.c +++ b/hl/tools/gif2h5/readhdf.c @@ -86,7 +86,7 @@ int ReadHDF(BYTE** data, BYTE palette[256][3], hsize_t *image_size, return -1; } if (H5Tget_size(dtype) != 1) { - fprintf(stderr , "Data is %d bytes per pixel. Cannot convert to GIF\n",H5Tget_size(dtype)); + fprintf(stderr , "Data is %d bytes per pixel. Cannot convert to GIF\n",(int)H5Tget_size(dtype)); return -1; } @@ -141,7 +141,7 @@ int ReadHDF(BYTE** data, BYTE palette[256][3], hsize_t *image_size, return -1; } if (H5Tget_size(pal_dtype) != 1) { - fprintf(stderr , "Palette data is %d bytes per pixel. Cannot convert to GIF\n",H5Tget_size(pal_dtype)); + fprintf(stderr , "Palette data is %d bytes per pixel. Cannot convert to GIF\n",(int)H5Tget_size(pal_dtype)); return -1; } diff --git a/hl/tools/gif2h5/writehdf.c b/hl/tools/gif2h5/writehdf.c index 7df7f29..d343aae 100644 --- a/hl/tools/gif2h5/writehdf.c +++ b/hl/tools/gif2h5/writehdf.c @@ -25,7 +25,6 @@ static int write_text_attribute(hid_t dataset_id , const char *attr_name, const char *attr_value, const size_t attr_len) { /* variables for the attributes */ - hsize_t attr_dims; /* dimensions for the attribute */ hsize_t attr_size; /* dimensions for the attribute */ hid_t attr_dataspace_id; /* dataspaces needed for the various attributes */ hid_t attr_attr_id; /* attribute id */ @@ -35,8 +34,6 @@ static int write_text_attribute(hid_t dataset_id , const char *attr_name, if (!attr_name || !attr_value) return -1; - attr_dims = 1; - /* figure out size of the data */ attr_size = (hsize_t)attr_len; diff --git a/src/H5.c b/src/H5.c index de41d2c..ae4fbdc 100644 --- a/src/H5.c +++ b/src/H5.c @@ -601,7 +601,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) /* Mention the versions we are referring to */ HDfprintf (stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum, - H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); + (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE); /* Bail out now. */ HDfputs ("Bye...\n", stderr); @@ -621,7 +621,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) /* Mention the versions we are referring to */ HDfprintf (stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum, - H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); + (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE); break; } /* end switch */ @@ -1280,16 +1280,16 @@ H5_timer_begin (H5_timer_t *timer) #ifdef H5_HAVE_GETRUSAGE HDgetrusage (RUSAGE_SELF, &rusage); timer->utime = (double)rusage.ru_utime.tv_sec + - (double)rusage.ru_utime.tv_usec/1e6; + ((double)rusage.ru_utime.tv_usec/1e6); timer->stime = (double)rusage.ru_stime.tv_sec + - (double)rusage.ru_stime.tv_usec/1e6; + ((double)rusage.ru_stime.tv_usec/1e6); #else timer->utime = 0.0; timer->stime = 0.0; #endif #ifdef H5_HAVE_GETTIMEOFDAY HDgettimeofday (&etime, NULL); - timer->etime = (double)etime.tv_sec + (double)etime.tv_usec/1e6; + timer->etime = (double)etime.tv_sec + ((double)etime.tv_usec/1e6); #else timer->etime = 0.0; #endif @@ -1558,7 +1558,7 @@ H5_trace (const double *returning, const char *func, const char *type, ...) if (argname) { unsigned n = (unsigned)MAX (0, (int)HDstrlen(argname)-3); /*lint !e666 Allow expression with side effects */ if (!HDstrcmp (argname+n, "_id")) { - HDstrncpy (buf, argname, MIN ((int)sizeof(buf)-1, n)); + HDstrncpy (buf, argname, (size_t)MIN ((int)sizeof(buf)-1, n)); buf[MIN((int)sizeof(buf)-1, n)] = '\0'; argname = buf; } diff --git a/src/H5A.c b/src/H5A.c index 1eb9374..57badd5 100644 --- a/src/H5A.c +++ b/src/H5A.c @@ -692,7 +692,7 @@ H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf, hid_t dxpl_id) HDmemcpy(tconv_buf,buf,(src_type_size*nelmts)); /* Perform datatype conversion */ - if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, 0, tconv_buf, bkg_buf, dxpl_id)<0) + if (H5T_convert(tpath, src_id, dst_id, nelmts, (size_t)0, (size_t)0, tconv_buf, bkg_buf, dxpl_id)<0) HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "datatype conversion failed") /* Free the previous attribute data buffer, if there is one */ @@ -858,7 +858,7 @@ H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id) HDmemcpy(tconv_buf,attr->data,(src_type_size*nelmts)); /* Perform datatype conversion. */ - if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, 0, tconv_buf, bkg_buf, dxpl_id)<0) + if (H5T_convert(tpath, src_id, dst_id, nelmts, (size_t)0, (size_t)0, tconv_buf, bkg_buf, dxpl_id)<0) HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "datatype conversion failed") /* Copy the converted data into the user's buffer */ diff --git a/src/H5B.c b/src/H5B.c index e53ec86..55f4b73 100644 --- a/src/H5B.c +++ b/src/H5B.c @@ -229,7 +229,7 @@ H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata, shared=H5RC_GET_OBJ(bt->rc_shared); HDassert(shared); if (NULL==(bt->native=H5FL_BLK_MALLOC(native_block,shared->sizeof_keys)) || - NULL==(bt->child=H5FL_SEQ_MALLOC(haddr_t,shared->two_k))) + NULL==(bt->child=H5FL_SEQ_MALLOC(haddr_t,(size_t)shared->two_k))) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree root node") if (HADDR_UNDEF==(*addr_p=H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)shared->sizeof_rnode))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree root node") @@ -306,7 +306,7 @@ H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_type, void *udata) shared=H5RC_GET_OBJ(bt->rc_shared); HDassert(shared); if (NULL==(bt->native=H5FL_BLK_MALLOC(native_block,shared->sizeof_keys)) || - NULL==(bt->child=H5FL_SEQ_MALLOC(haddr_t,shared->two_k))) + NULL==(bt->child=H5FL_SEQ_MALLOC(haddr_t,(size_t)shared->two_k))) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") if (H5F_block_read(f, H5FD_MEM_BTREE, addr, shared->sizeof_rnode, dxpl_id, shared->page)<0) @@ -315,7 +315,7 @@ H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_type, void *udata) p = shared->page; /* magic number */ - if (HDmemcmp(p, H5B_MAGIC, H5B_SIZEOF_MAGIC)) + if (HDmemcmp(p, H5B_MAGIC, (size_t)H5B_SIZEOF_MAGIC)) HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree signature") p += 4; @@ -399,7 +399,7 @@ H5B_serialize(const H5F_t *f, const H5B_t *bt) p = shared->page; /* magic number */ - HDmemcpy(p, H5B_MAGIC, H5B_SIZEOF_MAGIC); + HDmemcpy(p, H5B_MAGIC, (size_t)H5B_SIZEOF_MAGIC); p += 4; /* node type and level */ @@ -1526,7 +1526,7 @@ H5B_iterate (H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, H5B_operator_t op * We've reached the left-most leaf. Now follow the right-sibling * pointer from leaf to leaf until we've processed all leaves. */ - if (NULL==(child=H5FL_SEQ_MALLOC(haddr_t,shared->two_k)) || + if (NULL==(child=H5FL_SEQ_MALLOC(haddr_t,(size_t)shared->two_k)) || NULL==(key=H5FL_BLK_MALLOC(native_block,shared->sizeof_keys))) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") @@ -2097,7 +2097,7 @@ H5B_copy(const H5B_t *old_bt) HDmemcpy(new_node,old_bt,sizeof(H5B_t)); if ( NULL==(new_node->native=H5FL_BLK_MALLOC(native_block,shared->sizeof_keys)) || - NULL==(new_node->child=H5FL_SEQ_MALLOC(haddr_t,shared->two_k))) + NULL==(new_node->child=H5FL_SEQ_MALLOC(haddr_t,(size_t)shared->two_k))) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for B-tree root node") /* Copy the other structures */ diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h index 37047e7..74fa393 100644 --- a/src/H5Bpkg.h +++ b/src/H5Bpkg.h @@ -49,9 +49,9 @@ struct H5B_t { /* first field in structure */ H5RC_t *rc_shared; /*ref-counted shared info */ unsigned level; /*node level */ + unsigned nchildren; /*number of child pointers */ haddr_t left; /*address of left sibling */ haddr_t right; /*address of right sibling */ - unsigned nchildren; /*number of child pointers */ uint8_t *native; /*array of keys in native format */ haddr_t *child; /*2k child pointers */ }; diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index d6708f1..1f32c5d 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -194,12 +194,12 @@ typedef struct H5D_dxpl_cache_t { void *tconv_buf; /* Temporary conversion buffer (H5D_XFER_TCONV_BUF_NAME) */ void *bkgr_buf; /* Background conversion buffer (H5D_XFER_BKGR_BUF_NAME) */ H5T_bkg_t bkgr_buf_type; /* Background buffer type (H5D_XFER_BKGR_BUF_NAME) */ + H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */ double btree_split_ratio[3];/* B-tree split ratios (H5D_XFER_BTREE_SPLIT_RATIO_NAME) */ size_t vec_size; /* Size of hyperslab vector (H5D_XFER_HYPER_VECTOR_SIZE_NAME) */ #ifdef H5_HAVE_PARALLEL H5FD_mpio_xfer_t xfer_mode; /* Parallel transfer for this request (H5D_XFER_IO_XFER_MODE_NAME) */ #endif /*H5_HAVE_PARALLEL*/ - H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */ H5Z_cb_t filter_cb; /* Filter callback function (H5D_XFER_FILTER_CB_NAME) */ } H5D_dxpl_cache_t; diff --git a/src/H5F.c b/src/H5F.c index 5ecf3ba..dd6485e 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -1294,9 +1294,9 @@ H5F_locate_signature(H5FD_t *file, hid_t dxpl_id) addr = (8==n) ? 0 : (haddr_t)1 << n; if (H5FD_set_eoa(file, addr+H5F_SIGNATURE_LEN)<0) HGOTO_ERROR(H5E_IO, H5E_CANTINIT, HADDR_UNDEF, "unable to set EOA value for file signature") - if (H5FD_read(file, H5FD_MEM_SUPER, dxpl_id, addr, H5F_SIGNATURE_LEN, buf)<0) + if (H5FD_read(file, H5FD_MEM_SUPER, dxpl_id, addr, (size_t)H5F_SIGNATURE_LEN, buf)<0) HGOTO_ERROR(H5E_IO, H5E_CANTINIT, HADDR_UNDEF, "unable to read file signature") - if (!HDmemcmp(buf, H5F_SIGNATURE, H5F_SIGNATURE_LEN)) + if (!HDmemcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN)) break; } @@ -2399,7 +2399,7 @@ H5F_read_superblock(H5F_t *f, hid_t dxpl_id, H5G_entry_t *root_ent) UINT32DECODE(p, driver_size); /* Driver name and/or version */ - HDstrncpy(driver_name, (const char *)p, 8); + HDstrncpy(driver_name, (const char *)p, (size_t)8); driver_name[8] = '\0'; p += 8; /* advance past name/version */ @@ -2602,7 +2602,7 @@ H5F_write_superblock(H5F_t *f, hid_t dxpl_id) /* Encode the file super block */ p = sbuf; - HDmemcpy(p, H5F_SIGNATURE, H5F_SIGNATURE_LEN); + HDmemcpy(p, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN); p += H5F_SIGNATURE_LEN; *p++ = (uint8_t)super_vers; *p++ = (uint8_t)freespace_vers; @@ -2665,7 +2665,7 @@ H5F_write_superblock(H5F_t *f, hid_t dxpl_id) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information") /* Driver name */ - HDmemcpy(dbuf + 8, driver_name, 8); + HDmemcpy(dbuf + 8, driver_name, (size_t)8); } /* end if */ /* Compute super block checksum */ @@ -2901,7 +2901,7 @@ H5F_close(H5F_t *f) unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5F_close, FAIL) + FUNC_ENTER_NOAPI_NOINIT(H5F_close) assert(f->nrefs>0); @@ -3030,7 +3030,7 @@ H5F_close(H5F_t *f) int i; /* Local index variable */ /* Get the list of IDs of open dataset objects */ - while((obj_count=H5F_get_obj_ids(f, H5F_OBJ_DATASET, (sizeof(objs)/sizeof(objs[0])), objs))!=0) { + while((obj_count=H5F_get_obj_ids(f, H5F_OBJ_DATASET, (int)(sizeof(objs)/sizeof(objs[0])), objs))!=0) { /* Try to close all the open objects */ for(i=0; iprops=H5SL_create(H5SL_TYPE_STR,0.5,H5P_DEFAULT_SKIPLIST_HEIGHT))==NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTMAKETREE,FAIL,"can't create skip list for changed properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for changed properties"); /* Create the skip list for deleted properties */ if((new_plist->del=H5SL_create(H5SL_TYPE_STR,0.5,H5P_DEFAULT_SKIPLIST_HEIGHT))==NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTMAKETREE,FAIL,"can't create skip list for deleted properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for deleted properties"); /* Create the skip list to hold names of properties already seen * (This prevents a property in the class hierarchy from having it's @@ -501,7 +501,7 @@ H5P_copy_plist(H5P_genplist_t *old_plist) * already been seen) */ if((seen=H5SL_create(H5SL_TYPE_STR,0.5,H5P_DEFAULT_SKIPLIST_HEIGHT))==NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTMAKETREE,FAIL,"can't create skip list for seen properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties"); nseen=0; /* Cycle through the deleted properties & copy them into the new list's deleted section */ @@ -1363,7 +1363,7 @@ H5P_create_class(H5P_genclass_t *par_class, const char *name, unsigned internal, /* Create the skip list for properties */ if((pclass->props=H5SL_create(H5SL_TYPE_STR,0.5,H5P_DEFAULT_SKIPLIST_HEIGHT))==NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTMAKETREE,NULL,"can't create skip list for properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for properties"); /* Set callback functions and pass-along data */ pclass->create_func = cls_create; @@ -1527,11 +1527,11 @@ H5P_create(H5P_genclass_t *pclass) /* Create the skip list for changed properties */ if((plist->props=H5SL_create(H5SL_TYPE_STR,0.5,H5P_DEFAULT_SKIPLIST_HEIGHT))==NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTMAKETREE,NULL,"can't create skip list for changed properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for changed properties"); /* Create the skip list for deleted properties */ if((plist->del=H5SL_create(H5SL_TYPE_STR,0.5,H5P_DEFAULT_SKIPLIST_HEIGHT))==NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTMAKETREE,NULL,"can't create skip list for deleted properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for deleted properties"); /* Create the skip list to hold names of properties already seen * (This prevents a property in the class hierarchy from having it's @@ -1539,7 +1539,7 @@ H5P_create(H5P_genclass_t *pclass) * already been seen) */ if((seen=H5SL_create(H5SL_TYPE_STR,0.5,H5P_DEFAULT_SKIPLIST_HEIGHT))==NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTMAKETREE,NULL,"can't create skip list for seen properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for seen properties"); /* * Check if we should copy class properties (up through list of parent classes also), @@ -3886,7 +3886,7 @@ H5P_iterate_plist(hid_t plist_id, int *idx, H5P_iterate_t iter_func, void *iter_ /* Create the skip list to hold names of properties already seen */ if((seen=H5SL_create(H5SL_TYPE_STR,0.5,H5P_DEFAULT_SKIPLIST_HEIGHT))==NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTMAKETREE,FAIL,"can't create skip list for seen properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties"); /* Walk through the changed properties in the list */ if(H5SL_count(plist->props)>0) { @@ -5098,7 +5098,7 @@ H5P_close(void *_plist) H5SL_t *seen=NULL; /* Skip list to hold names of properties already seen */ size_t nseen; /* Number of items 'seen' */ hbool_t has_parent_class; /* Flag to indicate that this property list's class has a parent */ - ssize_t ndel; /* Number of items deleted */ + size_t ndel; /* Number of items deleted */ H5SL_node_t *curr_node; /* Current node in skip list */ H5P_genprop_t *tmp; /* Temporary pointer to properties */ unsigned make_cb=0; /* Operator data for property free callback */ @@ -5120,7 +5120,7 @@ H5P_close(void *_plist) * already been seen) */ if((seen=H5SL_create(H5SL_TYPE_STR,0.5,H5P_DEFAULT_SKIPLIST_HEIGHT))==NULL) - HGOTO_ERROR(H5E_PLIST,H5E_CANTMAKETREE,FAIL,"can't create skip list for seen properties"); + HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties"); nseen=0; /* Walk through the changed properties in the list */ diff --git a/test/bittests.c b/test/bittests.c index a59ea02..6e5f7da 100644 --- a/test/bittests.c +++ b/test/bittests.c @@ -174,9 +174,9 @@ test_copy (void) TESTING("bit copy operations"); for (i=0; i 0; --i) p_prod[i - 1] = (max_idx[i] - min_idx[i]) * p_prod[i]; - /* Calculate the index values from the element number. */ - for (i = 0, n = elmtno; i < (hsize_t)ndims; i++) { - p_idx[i] = n / p_prod[i] + min_idx[i]; - n %= p_prod[i]; - } - for ( i = 0; i < (hsize_t)ndims; i++) { ctx->pos[i] = curr_pos/ctx->acc[i]; @@ -345,7 +339,7 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5dump_t *info, h5tools_str_append(str, "%s", OPT(info->idx_sep, ",")); h5tools_str_append(str, OPT(info->idx_n_fmt, "%lu"), - (unsigned long) ctx->pos[i]); + (unsigned long)ctx->pos[i]); } } else { /* Scalar */ -- cgit v0.12