summaryrefslogtreecommitdiffstats
path: root/test/theap.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/theap.c')
-rw-r--r--test/theap.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/test/theap.c b/test/theap.c
index 3ceb167..bfead3c 100644
--- a/test/theap.c
+++ b/test/theap.c
@@ -99,11 +99,11 @@ test_heap_init(void)
/* Sort random numbers into increasing order */
HDmemcpy(inc_sort_num,rand_num,sizeof(test_obj)*NUM_ELEMS);
- HDqsort(inc_sort_num,NUM_ELEMS,sizeof(test_obj),tst_inc_sort);
+ HDqsort(inc_sort_num, (size_t)NUM_ELEMS, sizeof(test_obj), tst_inc_sort);
/* Sort random numbers into decreasing order */
HDmemcpy(dec_sort_num,rand_num,sizeof(test_obj)*NUM_ELEMS);
- HDqsort(dec_sort_num,NUM_ELEMS,sizeof(test_obj),tst_dec_sort);
+ HDqsort(dec_sort_num, (size_t)NUM_ELEMS, sizeof(test_obj), tst_dec_sort);
} /* end test_tst_init() */
/****************************************************************
@@ -310,7 +310,8 @@ test_heap_insert(void)
** "Core" routine called by test_heap_insert_many() routine.
**
****************************************************************/
-static void test_heap_insert_many_core(H5HP_type_t heap_type, test_obj *arr, size_t nelem, int top_val)
+static void
+test_heap_insert_many_core(H5HP_type_t heap_type, test_obj *arr, size_t nelem, int top_val)
{
H5HP_t *heap; /* Heap created */
ssize_t num; /* Number of elements in heap */
@@ -360,22 +361,22 @@ test_heap_insert_many(void)
MESSAGE(6, ("Testing Inserting Many Objects Into Heaps\n"));
/* Test creating a heap from random elements */
- test_heap_insert_many_core(H5HP_MAX_HEAP, rand_num,NUM_ELEMS,dec_sort_num[0].val);
+ test_heap_insert_many_core(H5HP_MAX_HEAP, rand_num, (size_t)NUM_ELEMS, dec_sort_num[0].val);
/* Test creating a heap from elements in increasing order */
- test_heap_insert_many_core(H5HP_MAX_HEAP, inc_sort_num,NUM_ELEMS,dec_sort_num[0].val);
+ test_heap_insert_many_core(H5HP_MAX_HEAP, inc_sort_num, (size_t)NUM_ELEMS, dec_sort_num[0].val);
/* Test creating a heap from elements in decreasing order */
- test_heap_insert_many_core(H5HP_MAX_HEAP, dec_sort_num,NUM_ELEMS,dec_sort_num[0].val);
+ test_heap_insert_many_core(H5HP_MAX_HEAP, dec_sort_num, (size_t)NUM_ELEMS, dec_sort_num[0].val);
/* Test creating a heap from random elements */
- test_heap_insert_many_core(H5HP_MIN_HEAP, rand_num,NUM_ELEMS,inc_sort_num[0].val);
+ test_heap_insert_many_core(H5HP_MIN_HEAP, rand_num, (size_t)NUM_ELEMS, inc_sort_num[0].val);
/* Test creating a heap from elements in increasing order */
- test_heap_insert_many_core(H5HP_MIN_HEAP, inc_sort_num,NUM_ELEMS,inc_sort_num[0].val);
+ test_heap_insert_many_core(H5HP_MIN_HEAP, inc_sort_num, (size_t)NUM_ELEMS, inc_sort_num[0].val);
/* Test creating a heap from elements in decreasing order */
- test_heap_insert_many_core(H5HP_MIN_HEAP, dec_sort_num,NUM_ELEMS,inc_sort_num[0].val);
+ test_heap_insert_many_core(H5HP_MIN_HEAP, dec_sort_num, (size_t)NUM_ELEMS, inc_sort_num[0].val);
} /* end test_heap_insert_many() */
@@ -670,22 +671,22 @@ test_heap_remove_many(void)
MESSAGE(6, ("Testing Removing Many Objects From Heaps\n"));
/* Test removing objects from maximum heap with random elements */
- test_heap_remove_many_core(H5HP_MAX_HEAP, rand_num,NUM_ELEMS);
+ test_heap_remove_many_core(H5HP_MAX_HEAP, rand_num, (size_t)NUM_ELEMS);
/* Test removing objects from maximum heap with elements already sorted in increasing order */
- test_heap_remove_many_core(H5HP_MAX_HEAP, inc_sort_num,NUM_ELEMS);
+ test_heap_remove_many_core(H5HP_MAX_HEAP, inc_sort_num, (size_t)NUM_ELEMS);
/* Test removing objects from maximum heap with elements already sorted in decreasing order */
- test_heap_remove_many_core(H5HP_MAX_HEAP, dec_sort_num,NUM_ELEMS);
+ test_heap_remove_many_core(H5HP_MAX_HEAP, dec_sort_num, (size_t)NUM_ELEMS);
/* Test removing objects from minimum heap with random elements */
- test_heap_remove_many_core(H5HP_MIN_HEAP, rand_num,NUM_ELEMS);
+ test_heap_remove_many_core(H5HP_MIN_HEAP, rand_num, (size_t)NUM_ELEMS);
/* Test removing objects from minimum heap with elements already sorted in increasing order */
- test_heap_remove_many_core(H5HP_MIN_HEAP, inc_sort_num,NUM_ELEMS);
+ test_heap_remove_many_core(H5HP_MIN_HEAP, inc_sort_num, (size_t)NUM_ELEMS);
/* Test removing objects from minimum heap with elements already sorted in decreasing order */
- test_heap_remove_many_core(H5HP_MIN_HEAP, dec_sort_num,NUM_ELEMS);
+ test_heap_remove_many_core(H5HP_MIN_HEAP, dec_sort_num, (size_t)NUM_ELEMS);
} /* end test_heap_remove_many() */