diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-03-10 19:02:41 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-03-10 19:02:41 (GMT) |
commit | 04a3b2a4580ed6f2df9949d88cd553f85860e91e (patch) | |
tree | 58dbdc111ea6ca3ae8dc07d0742beb5a20b6f47e /hl/src | |
parent | 89da5458b681568ed4e18a5250cfecd77d84f92c (diff) | |
download | hdf5-04a3b2a4580ed6f2df9949d88cd553f85860e91e.zip hdf5-04a3b2a4580ed6f2df9949d88cd553f85860e91e.tar.gz hdf5-04a3b2a4580ed6f2df9949d88cd553f85860e91e.tar.bz2 |
[svn-r26417] Removed compiler warnings from HL. HDF5-237
Tested: h5committest
Diffstat (limited to 'hl/src')
-rw-r--r-- | hl/src/H5DS.c | 15 | ||||
-rw-r--r-- | hl/src/H5DSprivate.h | 2 | ||||
-rw-r--r-- | hl/src/H5IM.c | 12 | ||||
-rw-r--r-- | hl/src/H5LT.c | 19 |
4 files changed, 30 insertions, 18 deletions
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index f4b754a..939a99f 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -144,7 +144,8 @@ herr_t H5DSattach_scale(hid_t did, hid_t dsid_j; /* DS dataset ID in DIMENSION_LIST */ H5O_info_t oi1, oi2; H5I_type_t it1, it2; - int i, len; + int i; + size_t len; int found_ds=0; htri_t is_scale; @@ -242,7 +243,7 @@ herr_t H5DSattach_scale(hid_t did, if (has_dimlist == 0) { - dims[0] = rank; + dims[0] = (hsize_t)rank; /* space for the attribute */ if((sid = H5Screate_simple(1, dims, NULL)) < 0) @@ -477,7 +478,7 @@ herr_t H5DSattach_scale(hid_t did, dsbuf[nelmts - 1] = dsl; /* create a new data space for the new references array */ - dims[0] = nelmts; + dims[0] = (hsize_t)nelmts; if((sid = H5Screate_simple(1, dims, NULL)) < 0) goto out; @@ -798,7 +799,7 @@ herr_t H5DSdetach_scale(hid_t did, for(ii=0; ii<nelmts; ii++) { /* First check if we have the same dimension index */ - if((int)idx == dsbuf[ii].dim_idx) { + if(idx == dsbuf[ii].dim_idx) { /* get the reference to the dataset */ ref = dsbuf[ii].ref; @@ -853,7 +854,7 @@ herr_t H5DSdetach_scale(hid_t did, if(nelmts) { /* create a new data space for the new references array */ - dims[0] = nelmts; + dims[0] = (hsize_t)nelmts; if((sid = H5Screate_simple(1, dims, NULL)) < 0) goto out; @@ -1153,7 +1154,7 @@ htri_t H5DSis_attached(hid_t did, goto out; /* same object */ - if(oi3.fileno == oi4.fileno && oi3.addr == oi4.addr && (int)idx==dsbuf[i].dim_idx) + if(oi3.fileno == oi4.fileno && oi3.addr == oi4.addr && idx==dsbuf[i].dim_idx) found_dset=1; /* close the dereferenced dataset */ @@ -1478,7 +1479,7 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label) if (has_labels == 0) { - dims[0] = rank; + dims[0] = (hsize_t)rank; /* space for the attribute */ if ((sid = H5Screate_simple(1, dims, NULL)) < 0) diff --git a/hl/src/H5DSprivate.h b/hl/src/H5DSprivate.h index 61c0a1c..39c3e74 100644 --- a/hl/src/H5DSprivate.h +++ b/hl/src/H5DSprivate.h @@ -28,7 +28,7 @@ /* attribute type of a DS dataset */ typedef struct ds_list_t { hobj_ref_t ref; /* object reference */ - int dim_idx; /* dimension index of the dataset */ + unsigned int dim_idx; /* dimension index of the dataset */ } ds_list_t; diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index aeda6ab..6fa548d 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -628,9 +628,9 @@ herr_t H5IMlink_palette( hid_t loc_id, n_refs = H5Sget_simple_extent_npoints(asid); - dim_ref = n_refs + 1; + dim_ref = (hsize_t)n_refs + 1; - refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (int)dim_ref ); + refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (size_t)dim_ref ); if ( H5Aread( aid, atid, refbuf ) < 0) goto out; @@ -949,9 +949,9 @@ herr_t H5IMget_palette_info( hid_t loc_id, n_refs = H5Sget_simple_extent_npoints(asid); - dim_ref = n_refs; + dim_ref = (hsize_t)n_refs; - refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (int)dim_ref ); + refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (size_t)dim_ref ); if ( H5Aread( aid, atid, refbuf ) < 0) goto out; @@ -1067,9 +1067,9 @@ herr_t H5IMget_palette( hid_t loc_id, n_refs = H5Sget_simple_extent_npoints(asid); - dim_ref = n_refs; + dim_ref = (hsize_t)n_refs; - refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (int)dim_ref ); + refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (size_t)dim_ref ); if ( H5Aread( aid, atid, refbuf ) < 0) goto out; diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 9d6123b..8541cfe 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -2398,7 +2398,7 @@ print_enum(hid_t type, char* str, size_t *str_len, hbool_t no_ubuf, size_t indt) for (i = 0; i < nmembs; i++) { if((name[i] = H5Tget_member_name(type, (unsigned)i))==NULL) goto out; - if(H5Tget_member_value(type, (unsigned)i, value + i * super_size) < 0) + if(H5Tget_member_value(type, (unsigned)i, value + (size_t)i * super_size) < 0) goto out; } @@ -2426,7 +2426,7 @@ print_enum(hid_t type, char* str, size_t *str_len, hbool_t no_ubuf, size_t indt) /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size" *strangely, unless use another pointer "copy".*/ - copy = value+i*dst_size; + copy = value + (size_t)i * dst_size; if (H5T_SGN_NONE == H5Tget_sign(native)) HDsnprintf(tmp_str, TMP_LEN, "%u", *((unsigned int*)((void *)copy))); else @@ -2557,6 +2557,7 @@ char* H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *sl switch (tcls) { case H5T_INTEGER: + case H5T_BITFIELD: if (H5Tequal(dtype, H5T_STD_I8BE)) { HDsnprintf(dt_str, *slen, "H5T_STD_I8BE"); } else if (H5Tequal(dtype, H5T_STD_I8LE)) { @@ -3053,9 +3054,19 @@ next: case H5T_TIME: HDsnprintf(dt_str, *slen, "H5T_TIME: not yet implemented"); break; - case H5T_BITFIELD: - HDsnprintf(dt_str, *slen, "H5T_BITFIELD: not yet implemented"); + case H5T_NO_CLASS: + HDsnprintf(dt_str, *slen, "H5T_NO_CLASS"); break; + case H5T_REFERENCE: + if (H5Tequal(dtype, H5T_STD_REF_DSETREG) == TRUE) { + HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_DSETREG }"); + } + else { + HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_OBJECT }"); + } + break; + case H5T_NCLASSES: + break; default: HDsnprintf(dt_str, *slen, "unknown data type"); } |