summaryrefslogtreecommitdiffstats
path: root/tools/misc/h5repart.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-08-13 09:23:53 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-08-13 09:23:53 (GMT)
commitf40381b0eab242182a02b0bb97aed88b37095086 (patch)
tree600c15466f4bbb9576ccc78f82287e5e6c78612b /tools/misc/h5repart.c
parentae0b7490126e45e312b63a27b499e5a25e402f40 (diff)
downloadhdf5-f40381b0eab242182a02b0bb97aed88b37095086.zip
hdf5-f40381b0eab242182a02b0bb97aed88b37095086.tar.gz
hdf5-f40381b0eab242182a02b0bb97aed88b37095086.tar.bz2
[svn-r30285] Description:
More warning cleanups, bringing the build down to 25 unique types of warnings, with 550 warnings in 122 files (down from 28, 770, and 134). Tested on: MacOSX/64 10.11.5 (amazon) w/serial & parallel (h5committest forthcoming)
Diffstat (limited to 'tools/misc/h5repart.c')
-rw-r--r--tools/misc/h5repart.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c
index 8657cbc..e44c957 100644
--- a/tools/misc/h5repart.c
+++ b/tools/misc/h5repart.c
@@ -194,9 +194,7 @@ main (int argc, char *argv[])
int src, dst=-1; /*source & destination files */
int need_seek=FALSE; /*destination needs to seek? */
int need_write; /*data needs to be written? */
- /*struct stat sb; temporary file stat buffer */
- /*struct _stati64 sb;*/
- h5_stat_t sb;
+ h5_stat_t sb; /*temporary file stat buffer */
int verbose=FALSE; /*display file names? */
@@ -243,7 +241,7 @@ main (int argc, char *argv[])
family_to_sec2 = TRUE;
argno++;
} else if ('b'==argv[argno][1]) {
- blk_size = get_size (prog_name, &argno, argc, argv);
+ blk_size = (size_t)get_size (prog_name, &argno, argc, argv);
} else if ('m'==argv[argno][1]) {
dst_size = get_size (prog_name, &argno, argc, argv);
} else {
@@ -308,7 +306,7 @@ main (int argc, char *argv[])
if (dst_is_family) n = (size_t)MIN((off_t)n, dst_size-dst_offset);
if (left_overs) {
n = (size_t)MIN ((off_t)n, left_overs);
- left_overs -= n;
+ left_overs = left_overs - (off_t)n;
need_write = FALSE;
} else if (src_offset<src_act_size) {
n = (size_t)MIN ((off_t)n, src_act_size-src_offset);
@@ -359,16 +357,16 @@ main (int argc, char *argv[])
* loop. The destination offset must be updated so we can fix
* trailing holes.
*/
- src_offset += n;
+ src_offset = src_offset + (off_t)n;
if (src_offset==src_act_size) {
HDclose (src);
if (!src_is_family) {
- dst_offset += n;
+ dst_offset = dst_offset + (off_t)n;
break;
}
sprintf (src_name, src_gen_name, ++src_membno);
if ((src=HDopen (src_name, O_RDONLY,0))<0 && ENOENT==errno) {
- dst_offset += n;
+ dst_offset = dst_offset + (off_t)n;
break;
} else if (src<0) {
perror (src_name);
@@ -392,7 +390,7 @@ main (int argc, char *argv[])
* needed. The first member is extended to the logical member size
* but other members might be smaller if they end with a hole.
*/
- dst_offset += n;
+ dst_offset = dst_offset + (off_t)n;
if (dst_is_family && dst_offset==dst_size) {
if (0==dst_membno) {
if (HDlseek (dst, dst_size-1, SEEK_SET)<0) {
@@ -474,7 +472,7 @@ main (int argc, char *argv[])
}
/* Set the property of the new member size as hsize_t */
- hdsize = dst_size;
+ hdsize = (hsize_t)dst_size;
if(H5Pset(fapl, H5F_ACS_FAMILY_NEWSIZE_NAME, &hdsize) < 0) {
perror ("H5Pset");
exit (EXIT_FAILURE);