mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-24 17:51:25 +08:00
[svn-r22112] Description:
Minor code safety issue in test/fheap.c and whitespace in other files. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug (Too minor to require h5committest)
This commit is contained in:
parent
ada561507a
commit
b7d9ed39c2
@ -361,7 +361,6 @@ H5HF_insert(H5HF_t *fh, hid_t dxpl_id, size_t size, const void *obj,
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
|
||||
#ifdef QAK
|
||||
HDfprintf(stderr, "%s: size = %Zu\n", FUNC, size);
|
||||
#endif /* QAK */
|
||||
|
13
test/fheap.c
13
test/fheap.c
@ -415,13 +415,20 @@ add_obj(H5HF_t *fh, hid_t dxpl, size_t obj_off,
|
||||
if(keep_ids) {
|
||||
/* Check for needing to increase size of heap ID array */
|
||||
if(keep_ids->num_ids + 1 > keep_ids->alloc_ids) {
|
||||
unsigned char *tmp_ids;
|
||||
size_t *tmp_lens;
|
||||
size_t *tmp_offs;
|
||||
|
||||
keep_ids->alloc_ids = MAX(1024, (keep_ids->alloc_ids * 2));
|
||||
if(NULL == (keep_ids->ids = (unsigned char *)H5MM_realloc(keep_ids->ids, id_len * keep_ids->alloc_ids)))
|
||||
if(NULL == (tmp_ids = (unsigned char *)H5MM_realloc(keep_ids->ids, id_len * keep_ids->alloc_ids)))
|
||||
TEST_ERROR
|
||||
if(NULL == (keep_ids->lens = (size_t *)H5MM_realloc(keep_ids->lens, sizeof(size_t) * keep_ids->alloc_ids)))
|
||||
keep_ids->ids = tmp_ids;
|
||||
if(NULL == (tmp_lens = (size_t *)H5MM_realloc(keep_ids->lens, sizeof(size_t) * keep_ids->alloc_ids)))
|
||||
TEST_ERROR
|
||||
if(NULL == (keep_ids->offs = (size_t *)H5MM_realloc(keep_ids->offs, sizeof(size_t) * keep_ids->alloc_ids)))
|
||||
keep_ids->lens = tmp_lens;
|
||||
if(NULL == (tmp_offs = (size_t *)H5MM_realloc(keep_ids->offs, sizeof(size_t) * keep_ids->alloc_ids)))
|
||||
TEST_ERROR
|
||||
keep_ids->offs = tmp_offs;
|
||||
} /* end if */
|
||||
|
||||
/* Append the object info onto the array */
|
||||
|
@ -211,7 +211,7 @@ TOOLTEST() {
|
||||
# any unexpected output from that stream too.
|
||||
TESTING $H5LS $@
|
||||
(
|
||||
cd $TESTDIR
|
||||
cd $TESTDIR
|
||||
$RUNSERIAL $H5LS_BIN "$@"
|
||||
) >$actual 2>$actual_err
|
||||
|
||||
@ -223,37 +223,37 @@ TOOLTEST() {
|
||||
STDERR_FILTER $actual_err
|
||||
cat $actual_err >> $actual
|
||||
if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if [ yes = "$verbose" ]; then
|
||||
echo "test returned with exit code $exitcode"
|
||||
echo "test output: (up to $NLINES lines)"
|
||||
head -$NLINES $actual
|
||||
echo "***end of test output***"
|
||||
echo ""
|
||||
fi
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if [ yes = "$verbose" ]; then
|
||||
echo "test returned with exit code $exitcode"
|
||||
echo "test output: (up to $NLINES lines)"
|
||||
head -$NLINES $actual
|
||||
echo "***end of test output***"
|
||||
echo ""
|
||||
fi
|
||||
elif [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
fi
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual $actual_err $actual_sav $actual_err_sav
|
||||
rm -f $actual $actual_err $actual_sav $actual_err_sav
|
||||
fi
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
### T H E T E S T S ###
|
||||
### T H E T E S T S ###
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
# prepare for test
|
||||
|
Loading…
x
Reference in New Issue
Block a user