mirror of
https://github.com/HarbourMasters/Starship
synced 2026-05-23 06:54:39 -04:00
fix GCC UB with audio (finally)
This commit is contained in:
@@ -339,7 +339,7 @@ build/src/libultra/os/%.o: OPTFLAGS := -Os
|
||||
build/src/libultra/rmon/%.o: OPTFLAGS := -Os
|
||||
build/src/libultra/debug/%.o: OPTFLAGS := -Os
|
||||
build/src/libultra/host/%.o: OPTFLAGS := -Os
|
||||
build/src/audio/audio_load.o: OPTFLAGS := -Os # Crashes with -O2 and -O3
|
||||
build/src/audio/audio_load.o: OPTFLAGS := -O2
|
||||
build/src/audio/%.o: OPTFLAGS := -O2 -g
|
||||
|
||||
# per-file flags
|
||||
|
||||
@@ -793,7 +793,11 @@ typedef struct {
|
||||
/* 0x02 */ s16 unkMediumParam;
|
||||
/* 0x04 */ u32 romAddr;
|
||||
/* 0x08 */ char pad[0x8];
|
||||
#ifdef AVOID_UB
|
||||
/* 0x10 */ AudioTableEntry entries[]; // (dynamic size)
|
||||
#else
|
||||
/* 0x10 */ AudioTableEntry entries[1]; // (dynamic size)
|
||||
#endif
|
||||
} AudioTable; // size >= 0x20
|
||||
|
||||
typedef struct SampleDma {
|
||||
|
||||
Reference in New Issue
Block a user