Skip to content

Commit afd35fa

Browse files
author
Francisco Javier Trujillo Mata
committed
Disable some warnings and improve Makefile
1 parent c5ad309 commit afd35fa

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@ EE_LIB = libps2stuff.a
22

33
EE_LDFLAGS += -L. -L$(PS2SDK)/ports/lib
44
EE_INCS += -I./include -I$(PS2SDK)/ports/include
5-
EE_CFLAGS += -D_DEBUG
6-
EE_CXXFLAGS += -D_DEBUG
5+
6+
ifeq ($(DEBUG), 1)
7+
EE_CFLAGS += -D_DEBUG
8+
EE_CXXFLAGS += -D_DEBUG
9+
endif
10+
11+
# Disabling warnings
12+
WARNING_FLAGS = -Wno-strict-aliasing -Wno-conversion-null
13+
714
# VU0 code is broken so disable for now
8-
EE_CFLAGS += -DNO_VU0_VECTORS -DNO_ASM
9-
EE_CXXFLAGS += -DNO_VU0_VECTORS -DNO_ASM
15+
EE_CFLAGS += $(WARNING_FLAGS) -DNO_VU0_VECTORS -DNO_ASM
16+
EE_CXXFLAGS += $(WARNING_FLAGS) -DNO_VU0_VECTORS -DNO_ASM
1017

1118
EE_OBJS = \
1219
src/core.o \

src/drawenv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ void CDrawEnv::SendSettings(bool waitForEnd, bool flushCache)
174174
void CDrawEnv::SendSettings(CSCDmaPacket& packet)
175175
{
176176
bool opened_tag;
177-
if (opened_tag = !packet.HasOpenTag())
177+
if ((opened_tag = !packet.HasOpenTag()))
178178
packet.Cnt();
179179
packet.Add(&SettingsGifTag, uiNumGSRegs + 1);
180180
if (opened_tag)

src/packet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ CDmaPacket::CDmaPacket(tU128* buffer, tU32 bufferQWSize, tDmaChannelId channel,
2929
, bDeallocateBuffer(false)
3030
{
3131
// PLIN
32-
mErrorIf(memMapping == Core::MemMappings::Uncached || memMapping == Core::MemMappings::UncachedAccl && (tU32)buffer & (64 - 1),
32+
mErrorIf(memMapping == Core::MemMappings::Uncached || ((memMapping == Core::MemMappings::UncachedAccl) && ((tU32)buffer & (64 - 1))),
3333
"Dma buffer should be aligned on a cache line (64-byte boundary) when using the uncached mem mappings!");
3434
mErrorIf((memMapping == Core::MemMappings::Uncached || memMapping == Core::MemMappings::UncachedAccl) && bufferQWSize & (4 - 1),
3535
"Dma buffer size should be a whole number of cache lines (64 bytes = 4 quads) when using the uncached mem mappings!");

0 commit comments

Comments
 (0)