From bb070537ff736ded9da53b57429785fdf4661533 Mon Sep 17 00:00:00 2001 From: Wendal Chen Date: Sat, 27 Apr 2024 07:31:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?remove:=20=E7=A7=BB=E9=99=A4fastlz=E4=B8=AD?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=9A=84pragma=20GCC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/fastlz/fastlz.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/fastlz/fastlz.c b/components/fastlz/fastlz.c index 36f7de22..401f8171 100644 --- a/components/fastlz/fastlz.c +++ b/components/fastlz/fastlz.c @@ -25,8 +25,8 @@ #include -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" +// #pragma GCC diagnostic push +// #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" /* * Give hints to the compiler for branch prediction optimization. @@ -500,4 +500,4 @@ int fastlz_compress_level(int level, const void* input, int length, void* output return 0; } -#pragma GCC diagnostic pop +// #pragma GCC diagnostic pop From c365ee4cd5545d64e6796404a44c710e594d1c72 Mon Sep 17 00:00:00 2001 From: Wendal Chen Date: Sat, 27 Apr 2024 07:36:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20nes=5Fcpu.prg=5Fbanks=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E6=95=B0=E7=BB=84=E8=B6=8A=E7=95=8C,=20-Werror=3Darra?= =?UTF-8?q?y-bounds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/nes/src/nes_cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/nes/src/nes_cpu.c b/components/nes/src/nes_cpu.c index 7cf115a9..ff139911 100644 --- a/components/nes/src/nes_cpu.c +++ b/components/nes/src/nes_cpu.c @@ -100,7 +100,7 @@ static inline const uint8_t* nes_get_dma_address(nes_t* nes,uint8_t data) { // return famicom->save_ram + ((uint16_t)(data & 0x1f) << 8); case 4: case 5: case 6: case 7: // 高一位为1, [$8000, $10000) 程序PRG-ROM区 - return nes->nes_cpu.prg_banks[data >> 4] + ((uint16_t)(data & 0x0f) << 8); + return nes->nes_cpu.prg_banks[(data >> 4) & 0x3] + ((uint16_t)(data & 0x0f) << 8); } } From 83f0975aaadfc465d82c5ea06a608c686f59d603 Mon Sep 17 00:00:00 2001 From: Wendal Chen Date: Sat, 27 Apr 2024 07:44:32 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20tlsf=5Fstat=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/mempool/tlsf3/tlsf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/mempool/tlsf3/tlsf.c b/components/mempool/tlsf3/tlsf.c index 189cc979..86503434 100644 --- a/components/mempool/tlsf3/tlsf.c +++ b/components/mempool/tlsf3/tlsf.c @@ -1295,4 +1295,5 @@ int tlsf_stat(pool_t pool, size_t *total, size_t *used, size_t *maxused) { *total = ctx.total; *used = ctx.used; *maxused = ctx.used; + return 0; }