From: retro-wertz Date: Sat, 3 Aug 2019 09:53:45 +0000 (+0800) Subject: psxbios.c: Cleanup buopen() X-Git-Tag: r24l~706^2~2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6a44e964a9759ff89ae4489bb638901984c0211;p=pcsx_rearmed.git psxbios.c: Cleanup buopen() - This just silences some [-Wpointer-sign] warning from last PR --- diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index 388d6063..ed43045f 100644 --- a/libpcsxcore/psxbios.c +++ b/libpcsxcore/psxbios.c @@ -2025,17 +2025,18 @@ void psxBios_UnDeliverEvent() { // 0x20 char ffile[64], *pfile; int nfile; -static void buopen(int mcd, u8 *ptr, u8 *cfg) + +static void buopen(int mcd, char *ptr, char *cfg) { int i; - u8 *fptr = ptr; + char *mcd_data = ptr; strcpy(FDesc[1 + mcd].name, Ra0+5); FDesc[1 + mcd].offset = 0; FDesc[1 + mcd].mode = a1; for (i=1; i<16; i++) { - fptr += 128; + const char *fptr = mcd_data + 128 * i; if ((*fptr & 0xF0) != 0x50) continue; if (strcmp(FDesc[1 + mcd].name, fptr+0xa)) continue; FDesc[1 + mcd].mcfile = i; @@ -2044,12 +2045,11 @@ static void buopen(int mcd, u8 *ptr, u8 *cfg) break; } if (a1 & 0x200 && v0 == -1) { /* FCREAT */ - fptr = ptr; for (i=1; i<16; i++) { int j, xor, nblk = a1 >> 16; - u8 *pptr, *fptr2; + char *pptr, *fptr2; + char *fptr = mcd_data + 128 * i; - fptr += 128; if ((*fptr & 0xF0) != 0xa0) continue; FDesc[1 + mcd].mcfile = i; @@ -2094,8 +2094,6 @@ static void buopen(int mcd, u8 *ptr, u8 *cfg) */ void psxBios_open() { // 0x32 - int i; - char *ptr; void *pa0 = Ra0; #ifdef PSXBIOS_LOG