1
0
Meco Man 2 жил өмнө
parent
commit
f27110decd

+ 3 - 3
examples/utest/testcases/kernel/memheap_tc.c

@@ -22,19 +22,19 @@
 static void memheap_test(void)
 {
     struct rt_memheap heap1;
-    rt_ubase_t ptr_start;
+    void * ptr_start;
     void *ptr[SLICE_NUM];
     int i, cnt = 0;
 
     /* init heap */
-    ptr_start = (rt_ubase_t)rt_malloc_align(HEAP_SIZE, HEAP_ALIGN);
+    ptr_start = rt_malloc_align(HEAP_SIZE, HEAP_ALIGN);
     if (ptr_start == RT_NULL)
     {
         rt_kprintf("totle size too big,can not malloc memory!");
         return;
     }
 
-    rt_memheap_init(&heap1, HEAP_NAME, (void *)ptr_start, HEAP_SIZE);
+    rt_memheap_init(&heap1, HEAP_NAME, ptr_start, HEAP_SIZE);
 
     /* test start */
     for (i = 0; i < SLICE_NUM; i++)

+ 1 - 1
examples/utest/testcases/kernel/mutex_tc.c

@@ -336,7 +336,7 @@ static void test_dynamic_mutex_create(void)
 
     /* PRIO mode */
     dynamic_mutex = rt_mutex_create("dynamic_mutex", RT_IPC_FLAG_PRIO);
-    if (RT_NULL == result)
+    if (RT_NULL == dynamic_mutex)
     {
         uassert_true(RT_FALSE);
     }