diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-11-27 16:29:13 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-11-27 16:29:13 (GMT) |
commit | d456c2bb82be98bc2b7c1039927eb52258d1a0eb (patch) | |
tree | a7d8a65aef5d962c89b0965c86eb535917c023ad /src/H5FDlog.c | |
parent | 05264c88788f9bd9b04a58673ded246904210235 (diff) | |
download | hdf5-d456c2bb82be98bc2b7c1039927eb52258d1a0eb.zip hdf5-d456c2bb82be98bc2b7c1039927eb52258d1a0eb.tar.gz hdf5-d456c2bb82be98bc2b7c1039927eb52258d1a0eb.tar.bz2 |
[svn-r4643] Purpose:
Code cleanup
Description:
Windows is generating hundreds of warnings from some of the practices in
the library. Mostly, they are because size_t is 32-bit and hsize_t is
64-bit on Windows and we were carelessly casting the larger values down to
the smaller ones without checking for overflow.
Also, some other small code cleanups,etc.
Solution:
Re-worked some algorithms to eliminate the casts and also added more
overflow checking for assignments and function parameters which needed
casts.
Kent did most of the work, I just went over his changes and fit them into
the the library code a bit better.
Platforms tested:
FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r-- | src/H5FDlog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c index aa2bcb2..a9f76af 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -749,7 +749,7 @@ printf("%s: flavor=%s, size=%lu\n",FUNC,flavors[type],(unsigned long)size); /* Retain the (first) flavor of the information written to the file */ if(file->fa.verbosity>=0) { assert(addr<file->iosize); - assert(size==(hsize_t)((size_t)size)); /*check for overflow*/ + H5_CHECK_OVERFLOW(size,hsize_t,size_t); HDmemset(&file->flavor[addr],type,(size_t)size); if(file->fa.verbosity>1) |