diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-06-13 04:52:22 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-06-13 04:52:22 (GMT) |
commit | 97b6832023ceb7665750de6a0adb3e67c5961df2 (patch) | |
tree | f8894636f01d284a508925d3f165a6b246606295 /src/H5checksum.c | |
parent | 97e6dc5d876d4e772fd65727f6b9b2c4367cb080 (diff) | |
download | hdf5-97b6832023ceb7665750de6a0adb3e67c5961df2.zip hdf5-97b6832023ceb7665750de6a0adb3e67c5961df2.tar.gz hdf5-97b6832023ceb7665750de6a0adb3e67c5961df2.tar.bz2 |
[svn-r15211] Description:
Update the gcc flags for version 4.3
Clean up warnings
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.5.3 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5checksum.c')
-rw-r--r-- | src/H5checksum.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5checksum.c b/src/H5checksum.c index e42f152..3359722 100644 --- a/src/H5checksum.c +++ b/src/H5checksum.c @@ -126,10 +126,10 @@ H5_checksum_fletcher32(const void *_data, size_t _len) * performed without numeric overflow) */ while (len) { - unsigned tlen = len > 360 ? 360 : len; + size_t tlen = len > 360 ? 360 : len; len -= tlen; do { - sum1 += (((uint16_t)data[0]) << 8) | ((uint16_t)data[1]); + sum1 += (uint32_t)(((uint16_t)data[0]) << 8) | ((uint16_t)data[1]); data += 2; sum2 += sum1; } while (--tlen); @@ -139,7 +139,7 @@ H5_checksum_fletcher32(const void *_data, size_t _len) /* Check for odd # of bytes */ if(_len % 2) { - sum1 += ((uint16_t)*data) << 8; + sum1 += (uint32_t)(((uint16_t)*data) << 8); sum2 += sum1; sum1 = (sum1 & 0xffff) + (sum1 >> 16); sum2 = (sum2 & 0xffff) + (sum2 >> 16); @@ -486,8 +486,8 @@ H5_hash_string(const char *str) /* Sanity check */ HDassert(str); - while(c = *str++) - hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ + while((c = *str++)) + hash = ((hash << 5) + hash) + (uint32_t)c; /* hash * 33 + c */ FUNC_LEAVE_NOAPI(hash) } /* end H5_hash_string() */ |