summaryrefslogtreecommitdiffstats
path: root/perform/zip_perf.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-10-14 18:34:47 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-10-14 18:34:47 (GMT)
commit5e7f799ca925e7ca1c99bc9c10c16d1ac6c609fb (patch)
treed497891e65397b622fe08458c5753e0054844bb9 /perform/zip_perf.c
parent3ce3ccc9eb29dc545bd2fcfec65c2062755ab514 (diff)
downloadhdf5-5e7f799ca925e7ca1c99bc9c10c16d1ac6c609fb.zip
hdf5-5e7f799ca925e7ca1c99bc9c10c16d1ac6c609fb.tar.gz
hdf5-5e7f799ca925e7ca1c99bc9c10c16d1ac6c609fb.tar.bz2
[svn-r5985] Purpose:
Code cleanup Description: Cleaned up more compiler warnings... Platforms tested: FreeBSD 4.6 (sleipnir) w and w/o parallel Linux 2.2.x (eirene) w/FORTRAN & C++ Solaris 2.7 (arabica) w/FORTRAN IRIX64 6.5 (modi4) w/FORTRAN & parallel
Diffstat (limited to 'perform/zip_perf.c')
-rw-r--r--perform/zip_perf.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/perform/zip_perf.c b/perform/zip_perf.c
index 926b3cf..2a5d9d5 100644
--- a/perform/zip_perf.c
+++ b/perform/zip_perf.c
@@ -245,7 +245,7 @@ write_file(Bytef *source, uLongf sourceLen)
if (rc == -1)
error(strerror(errno));
- if (rc == d_len)
+ if (rc == (int)d_len)
break;
d_len -= rc;
@@ -292,6 +292,7 @@ compress_buffer(Bytef *dest, uLongf *destLen, const Bytef *source,
}
}
+#ifdef LATER
/*
* Function: uncompress_buffer
* Purpose: Uncompress the buffer.
@@ -310,6 +311,7 @@ uncompress_buffer(Bytef *dest, uLongf *destLen, const Bytef *source,
return rc;
}
+#endif /* LATER */
/*
* Function: get_unique_name
@@ -431,10 +433,10 @@ parse_size_directive(const char *size)
static void
fill_with_random_data(Bytef *src, uLongf src_len)
{
- register int i;
- struct stat buf;
+ register unsigned u;
+ struct stat stat_buf;
- if (stat("/dev/urandom", &buf) == 0) {
+ if (stat("/dev/urandom", &stat_buf) == 0) {
uLongf len = src_len;
Bytef *buf = src;
int fd = open("/dev/urandom", O_RDONLY);
@@ -450,7 +452,7 @@ fill_with_random_data(Bytef *src, uLongf src_len)
if (rc == -1)
error(strerror(errno));
- if (rc == len)
+ if (rc == (ssize_t)len)
break;
buf += rc;
@@ -459,8 +461,8 @@ fill_with_random_data(Bytef *src, uLongf src_len)
} else {
printf("Using random() for random data\n");
- for (i = 0; i < src_len; ++i)
- src[i] = 0xff & random();
+ for (u = 0; u < src_len; ++u)
+ src[u] = 0xff & random();
}
if (compress_percent) {
@@ -527,7 +529,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size,
if (rc == -1)
error(strerror(errno));
- if (rc == s_len)
+ if (rc == (ssize_t)s_len)
break;
s_len -= rc;