ref: 2dbc44928fbd1df0200bff76a2bf9b6f61974d73
parent: 30ec79e5ed9c1d21e6bc40f139a0555aa0ca0933
author: allkern <lisandroaalarcon@gmail.com>
date: Sat May 11 08:28:51 EDT 2024
Fix warnings once and for all
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
.ONESHELL:
CFLAGS := -g -DLOG_USE_COLOR `sdl2-config --cflags --libs`
-CFLAGS += -Ofast -Wno-overflow -Wall -pedantic -Wno-address-of-packed-member
+CFLAGS += -Ofast -Wno-overflow -Wall -pedantic -Wno-address-of-packed-member -flto
PLATFORM := $(shell uname -s)
--- a/frontend/config.c
+++ b/frontend/config.c
@@ -4,8 +4,7 @@
#include "config.h"
#include "common.h"
-#include "log.h"
-// #include "psx/log.h"
+#include "../psx/log.h"
static const char* g_version_text =
#ifdef _WIN32
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -1,9 +1,6 @@
-#include "psx.h"
-#include "input/sda.h"
-#include "disc/cue.h"
-// #include "psx/psx.h"
-// #include "psx/input/sda.h"
-// #include "psx/disc/cue.h"
+#include "../psx/psx.h"
+#include "../psx/input/sda.h"
+#include "../psx/disc/cue.h"
#include "screen.h"
#include "config.h"
--- a/frontend/screen.h
+++ b/frontend/screen.h
@@ -1,8 +1,7 @@
#ifndef SCREEN_H
#define SCREEN_H
-#include "psx.h"
-// #include "psx/psx.h"
+#include "../psx/psx.h"
#include "common.h"
#include <string.h>
--- a/psx/bus.c
+++ b/psx/bus.c
@@ -12,7 +12,7 @@
0x7fffffff, 0x1fffffff, 0xffffffff, 0xffffffff
};
-psx_bus_t* psx_bus_create(void) {
+psx_bus_t* psx_bus_create() {
return (psx_bus_t*)malloc(sizeof(psx_bus_t));
}
@@ -114,7 +114,7 @@
uint8_t psx_bus_read8(psx_bus_t* bus, uint32_t addr) {
bus->access_cycles = 2;
- uint32_t vaddr = addr;
+ // uint32_t vaddr = addr;
addr &= g_psx_bus_region_mask_table[addr >> 29];
--- a/psx/cpu.c
+++ b/psx/cpu.c
@@ -633,8 +633,6 @@
uint32_t s = cpu->r[S];
uint32_t t = cpu->r[rt];
- uint32_t tp = t;
-
uint32_t addr = s + IMM16S;
uint32_t load = psx_bus_read32(cpu->bus, addr & 0xfffffffc);
--
⑨