diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-09-14 21:02:43 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-09-14 21:02:43 (GMT) |
commit | 7f817fea7c50cea4305bc14fcaf4d80fb3dc42e4 (patch) | |
tree | e18b6cefc2cc51c58ebacec1d6a9051742754f71 /src/H5Spoint.c | |
parent | c1c384878ba58193120c3da804d761542c47bd7d (diff) | |
parent | 052efd9bde06ea2427beffd3ea493cbc53a17608 (diff) | |
download | hdf5-7f817fea7c50cea4305bc14fcaf4d80fb3dc42e4.zip hdf5-7f817fea7c50cea4305bc14fcaf4d80fb3dc42e4.tar.gz hdf5-7f817fea7c50cea4305bc14fcaf4d80fb3dc42e4.tar.bz2 |
Merge branch 'develop' into evict_on_close
Diffstat (limited to 'src/H5Spoint.c')
-rw-r--r-- | src/H5Spoint.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 0f85110..1531bac 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -1125,10 +1125,10 @@ H5S_point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end) if(((hssize_t)node->pnt[u] + space->select.offset[u]) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "offset moves selection out of bounds") - if(start[u] > (node->pnt[u] + space->select.offset[u])) - start[u] = node->pnt[u] + space->select.offset[u]; - if(end[u] < (node->pnt[u] + space->select.offset[u])) - end[u] = node->pnt[u] + space->select.offset[u]; + if(start[u] > (hsize_t)((hssize_t)node->pnt[u] + space->select.offset[u])) + start[u] = (hsize_t)((hssize_t)node->pnt[u] + space->select.offset[u]); + if(end[u] < (hsize_t)((hssize_t)node->pnt[u] + space->select.offset[u])) + end[u] = (hsize_t)((hssize_t)node->pnt[u] + space->select.offset[u]); } /* end for */ node = node->next; } /* end while */ @@ -1703,7 +1703,7 @@ H5S_point_get_seq_list(const H5S_t *space, unsigned flags, H5S_sel_iter_t *iter, while(NULL != node) { /* Compute the offset of each selected point in the buffer */ for(i = ndims - 1, acc = iter->elmt_size, loc = 0; i >= 0; i--) { - loc += (node->pnt[i] + space->select.offset[i]) * acc; + loc += (hsize_t)((hssize_t)node->pnt[i] + space->select.offset[i]) * acc; acc *= dims[i]; } /* end for */ |