diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2012-07-26 13:32:12 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2012-07-26 13:32:12 (GMT) |
commit | 389e928176aae700eddefcb1983e9ff1a7665046 (patch) | |
tree | 94aec8d98dd44b35e3beca57d6b5796c280bee30 | |
parent | dd27fe612cf9c80d223939a46a96202eaf81f60d (diff) | |
download | hdf5-389e928176aae700eddefcb1983e9ff1a7665046.zip hdf5-389e928176aae700eddefcb1983e9ff1a7665046.tar.gz hdf5-389e928176aae700eddefcb1983e9ff1a7665046.tar.bz2 |
[svn-r22604] cast void* to char* for calculation
Issue on windows
-rw-r--r-- | tools/lib/h5tools.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index c7ff2d3..495aca1 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -1371,7 +1371,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t pad = H5Tget_strpad(tid); for (block_index = 0; block_index < block_nelmts; block_index++) { - mem = _mem + block_index * size; + mem = ((unsigned char*)_mem) + block_index * size; if (H5Tis_variable_str(tid)) { s = *(char**) mem; @@ -1399,7 +1399,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t nmembs = H5Tget_nmembers(tid); for (block_index = 0; block_index < block_nelmts; block_index++) { - mem = _mem + block_index * size; + mem = ((unsigned char*)_mem) + block_index * size; for (j = 0; j < nmembs; j++) { offset = H5Tget_member_offset(tid, j); memb = H5Tget_member_type(tid, j); @@ -1432,7 +1432,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t } for (block_index = 0; block_index < block_nelmts; block_index++) { - mem = _mem + block_index * size; + mem = ((unsigned char*)_mem) + block_index * size; /* dump the array element */ if (render_bin_output(stream, container, memb, mem, nelmts) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed"); @@ -1450,7 +1450,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t memb = H5Tget_super(tid); for (block_index = 0; block_index < block_nelmts; block_index++) { - mem = _mem + block_index * size; + mem = ((unsigned char*)_mem) + block_index * size; /* Get the number of sequence elements */ nelmts = ((hvl_t *) mem)->len; @@ -1470,7 +1470,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t H5S_sel_type region_type; for (block_index = 0; block_index < block_nelmts; block_index++) { - mem = _mem + block_index * size; + mem = ((unsigned char*)_mem) + block_index * size; region_id = H5Rdereference2(container, H5P_DEFAULT, H5R_DATASET_REGION, mem); if (region_id >= 0) { region_space = H5Rget_region(container, H5R_DATASET_REGION, mem); @@ -1494,7 +1494,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t break; default: for (block_index = 0; block_index < block_nelmts; block_index++) { - mem = _mem + block_index * size; + mem = ((unsigned char*)_mem) + block_index * size; if (size != HDfwrite(mem, sizeof(char), size, stream)) H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed"); } |