From: notaz Date: Tue, 7 Jun 2011 09:29:58 +0000 (+0300) Subject: psxbios: fix some -Wall warnings X-Git-Tag: r9~86 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=808a13bdcc83e7b0dec878bbcfc7774e2029b724;p=pcsx_rearmed.git psxbios: fix some -Wall warnings --- diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index cad69b31..0e53d9f1 100644 --- a/libpcsxcore/psxbios.c +++ b/libpcsxcore/psxbios.c @@ -804,8 +804,8 @@ void psxBios_qsort() { // 0x31 } void psxBios_malloc() { // 0x33 - unsigned int *chunk, *newchunk; - unsigned int dsize, csize, cstat; + unsigned int *chunk, *newchunk = NULL; + unsigned int dsize = 0, csize, cstat; int colflag; #ifdef PSXBIOS_LOG PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x33]); @@ -875,7 +875,7 @@ void psxBios_malloc() { // 0x33 // split free chunk *chunk = SWAP32(dsize); newchunk = (u32*)((uptr)chunk + dsize + 4); - *newchunk = SWAP32((csize - dsize - 4) & 0xfffffffc | 1); + *newchunk = SWAP32(((csize - dsize - 4) & 0xfffffffc) | 1); } // return pointer to allocated memory @@ -1010,7 +1010,7 @@ _start: memcpy((char*)PSXM(sp), save, 4 * 4); - SysPrintf(tmp); + SysPrintf("%s", tmp); pc0 = ra; } @@ -1818,7 +1818,7 @@ void psxBios_putchar() { // 3d } void psxBios_puts() { // 3e/3f - SysPrintf(Ra0); + SysPrintf("%s", Ra0); pc0 = ra; }