]> Chaos Git - corbenik/ctrulib.git/commitdiff
fix arning types not matching
authorLectem <lectem@gmail.com>
Sun, 28 Jun 2015 11:10:38 +0000 (13:10 +0200)
committerLectem <lectem@gmail.com>
Sun, 28 Jun 2015 11:33:26 +0000 (13:33 +0200)
libctru/source/gpu/gpu.c
libctru/source/system/allocateHeaps.c

index 326da5cf7260f8bb2b9d1659b5aa2c04914da138..455a8bc6c0be61a67962de149fd27122971340b0 100644 (file)
@@ -54,12 +54,12 @@ void GPUCMD_Run(u32* gxbuf)
 }
 
 extern u32 __linear_heap_size;
-extern u32* __linear_heap;
+extern u32 __linear_heap;
 
 void GPUCMD_FlushAndRun(u32* gxbuf)
 {
        //take advantage of GX_SetCommandList_First to flush gsp heap
-       GX_SetCommandList_First(gxbuf, gpuCmdBuf, gpuCmdBufOffset*4, __linear_heap, __linear_heap_size, NULL, 0);
+       GX_SetCommandList_First(gxbuf, gpuCmdBuf, gpuCmdBufOffset*4, (u32 *) __linear_heap, __linear_heap_size, NULL, 0);
        GX_SetCommandList_Last(gxbuf, gpuCmdBuf, gpuCmdBufOffset*4, 0x0);
 }
 
index 4009f8ec6d9bef80b33f628d9c63db42da028992..44bbe639290bddde29d5a4e507f5bb2b7bd9e695 100644 (file)
@@ -13,10 +13,10 @@ void __attribute__((weak)) __system_allocateHeaps() {
 
        // Allocate the application heap
        __heapBase = 0x08000000;
-       svcControlMemory(&tmp, __heapBase, 0x0, __heap_size, MEMOP_ALLOC, 0x3);
+       svcControlMemory(&tmp, __heapBase, 0x0, __heap_size, MEMOP_ALLOC, MEMPERM_READ | MEMPERM_WRITE);
 
        // Allocate the linear heap
-       svcControlMemory(&__linear_heap, 0x0, 0x0, __linear_heap_size, MEMOP_ALLOC_LINEAR, 0x3);
+       svcControlMemory(&__linear_heap, 0x0, 0x0, __linear_heap_size, MEMOP_ALLOC_LINEAR, MEMPERM_READ | MEMPERM_WRITE);
        // Set up newlib heap
        fake_heap_start = (char*)__heapBase;
        fake_heap_end = fake_heap_start + __heap_size;