summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-11-21 16:23:38 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-11-21 16:23:38 (GMT)
commitbc2d9432b3f05f21f0244c3da48bc8da98003485 (patch)
tree3c0d9a8dec330f397a861c83798d6a4e2c9fada3
parentf3674477db1c2f7566a85eaa2fd19ebebb7a3ee8 (diff)
downloadhdf5-bc2d9432b3f05f21f0244c3da48bc8da98003485.zip
hdf5-bc2d9432b3f05f21f0244c3da48bc8da98003485.tar.gz
hdf5-bc2d9432b3f05f21f0244c3da48bc8da98003485.tar.bz2
[svn-r6131] Purpose:
Code cleanup Description: Clean up compiler warnings from IRIX64 builds. Platforms tested: IRIX64 6.5 (modi4)
-rw-r--r--perform/zip_perf.c12
-rw-r--r--src/H5I.c2
-rw-r--r--src/H5Oplist.c2
-rw-r--r--test/file_handle.c2
-rw-r--r--test/tattr.c4
-rw-r--r--test/tvlstr.c7
6 files changed, 11 insertions, 18 deletions
diff --git a/perform/zip_perf.c b/perform/zip_perf.c
index 02e1c55..9514dc0 100644
--- a/perform/zip_perf.c
+++ b/perform/zip_perf.c
@@ -215,7 +215,7 @@ write_file(Bytef *source, uLongf sourceLen)
/* destination buffer needs to be at least 0.1% larger than sourceLen
* plus 12 bytes */
- destLen = (uLongf)((double)sourceLen + (sourceLen * 0.1)) + 12;
+ destLen = (uLongf)((double)sourceLen + ((double)sourceLen * 0.1)) + 12;
dest = (Bytef *)malloc(destLen);
if (!dest)
@@ -231,7 +231,7 @@ write_file(Bytef *source, uLongf sourceLen)
((double)timer_start.tv_usec) / MICROSECOND);
if (report_once_flag) {
- printf("\tCompression Ratio: %g\n", ((double)destLen) / sourceLen);
+ printf("\tCompression Ratio: %g\n", ((double)destLen) / (double)sourceLen);
report_once_flag = 0;
}
@@ -240,7 +240,7 @@ write_file(Bytef *source, uLongf sourceLen)
/* loop to make sure we write everything out that we want to write */
for (;;) {
- int rc = write(output, d_ptr, (size_t)d_len);
+ int rc = (int)write(output, d_ptr, (size_t)d_len);
if (rc == -1)
error(strerror(errno));
@@ -462,7 +462,7 @@ fill_with_random_data(Bytef *src, uLongf src_len)
printf("Using random() for random data\n");
for (u = 0; u < src_len; ++u)
- src[u] = 0xff & random();
+ src[u] = (Bytef)(0xff & random());
}
if (compress_percent) {
@@ -482,7 +482,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size,
Bytef *src;
for (src_len = min_buf_size; src_len <= max_buf_size; src_len <<= 1) {
- register int i, iters;
+ register unsigned long i, iters;
iters = file_size / src_len;
src = (Bytef *)calloc(1, sizeof(Bytef) * src_len);
@@ -612,7 +612,7 @@ main(int argc, char **argv)
min_buf_size = parse_size_directive(opt_arg);
break;
case 'c':
- compress_percent = strtol(opt_arg, NULL, 10);
+ compress_percent = (int)strtol(opt_arg, NULL, 10);
if (compress_percent < 0)
compress_percent = 0;
diff --git a/src/H5I.c b/src/H5I.c
index 65d7a90..b2a0eac 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -1168,7 +1168,7 @@ H5Iget_name(hid_t id, char *name/*out*/, size_t size)
} /* end if */
/* Set return value */
- ret_value=len;
+ ret_value=(ssize_t)len;
done:
FUNC_LEAVE(ret_value);
diff --git a/src/H5Oplist.c b/src/H5Oplist.c
index 277fdd8..83e9500 100644
--- a/src/H5Oplist.c
+++ b/src/H5Oplist.c
@@ -370,7 +370,7 @@ H5O_plist_encode(H5F_t UNUSED *f, uint8_t *p, const void *mesg)
}
}
- fprintf(stderr, "number of bytes == %d\n", p - old);
+ fprintf(stderr, "number of bytes == %u\n", (unsigned)(p - old));
done:
FUNC_LEAVE(ret_value);
diff --git a/test/file_handle.c b/test/file_handle.c
index 2457586..5984296 100644
--- a/test/file_handle.c
+++ b/test/file_handle.c
@@ -270,7 +270,7 @@ test_multi(void)
HDmemset(memb_addr, 0, sizeof memb_addr);
HDmemset(sv, 0, sizeof sv);
- for(mt=0; mt<H5FD_MEM_NTYPES; mt++)
+ for(mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt))
memb_map[mt] = H5FD_MEM_SUPER;
memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW;
diff --git a/test/tattr.c b/test/tattr.c
index f80d478..aea6287 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -188,7 +188,7 @@ test_attr_basic_write(void)
if(attr_name_size>0)
attr_name = (char*)HDcalloc((size_t)(attr_name_size+1), sizeof(char));
- ret=H5Aget_name(attr, (size_t)(attr_name_size+1), attr_name);
+ ret=(herr_t)H5Aget_name(attr, (size_t)(attr_name_size+1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
ret=HDstrcmp(attr_name, ATTR_TMP_NAME);
VERIFY(ret, 0, "HDstrcmp");
@@ -223,7 +223,7 @@ test_attr_basic_write(void)
if(attr_name_size>0)
attr_name = (char*)HDcalloc((size_t)(attr_name_size+1), sizeof(char));
- ret=H5Aget_name(attr2, (size_t)(attr_name_size+1), attr_name);
+ ret=(herr_t)H5Aget_name(attr2, (size_t)(attr_name_size+1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
ret=HDstrcmp(attr_name, ATTR1A_NAME);
VERIFY(ret, 0, "HDstrcmp");
diff --git a/test/tvlstr.c b/test/tvlstr.c
index 91bf47a..af809d6 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -239,7 +239,6 @@ static void test_vlstring_type(void)
H5T_cset_t cset;
H5T_str_t pad;
herr_t ret;
- size_t size;
/* Output message about test being performed */
MESSAGE(5, ("Testing VL String type\n"));
@@ -391,9 +390,6 @@ static void test_read_vl_string_attribute(void)
hid_t type;
herr_t ret;
char *string_att_check;
- hsize_t size[64];
- hid_t space;
- int ndims;
file = H5Fopen(DATAFILE, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(file, FAIL, "H5Fopen");
@@ -411,9 +407,6 @@ static void test_read_vl_string_attribute(void)
att = H5Aopen_name(root, "test_scalar");
CHECK(att, FAIL, "H5Aopen_name");
- space = H5Aget_space(att);
- ndims = H5Sget_simple_extent_dims(space, size, NULL);
-
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");