Skip to content

Commit

Permalink
Unused warnings are no longer treated as errrors by default (#4092)
Browse files Browse the repository at this point in the history
  • Loading branch information
DizzyEggg authored Feb 1, 2024
2 parents 1a65894 + e8538ef commit 1d9e692
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
GAME_LANGUAGE: ENGLISH
MODERN: 0
COMPARE: 0
UNUSED_ERROR: 1
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
21 changes: 14 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ else
EXE :=
endif

TITLE := POKEMON EMER
GAME_CODE := BPEE
MAKER_CODE := 01
REVISION := 0
MODERN ?= 1
TEST ?= 0
ANALYZE ?= 0
TITLE := POKEMON EMER
GAME_CODE := BPEE
MAKER_CODE := 01
REVISION := 0
MODERN ?= 1
TEST ?= 0
ANALYZE ?= 0
UNUSED_ERROR ?= 0

ifeq (agbcc,$(MAKECMDGOALS))
MODERN := 0
Expand Down Expand Up @@ -127,6 +128,12 @@ override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi
ifeq ($(ANALYZE),1)
override CFLAGS += -fanalyzer
endif
# Only throw an error for unused elements if its RH-Hideout's repo
ifeq ($(UNUSED_ERROR),0)
ifneq ($(GITHUB_REPOSITORY_OWNER),rh-hideout)
override CFLAGS += -Wno-error=unused-variable -Wno-error=unused-const-variable -Wno-error=unused-parameter -Wno-error=unused-function -Wno-error=unused-but-set-parameter -Wno-error=unused-but-set-variable -Wno-error=unused-value -Wno-error=unused-local-typedefs
endif
endif
ROM := $(MODERN_ROM_NAME)
OBJ_DIR := $(MODERN_OBJ_DIR_NAME)
LIBPATH := -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libnosys.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libc.a))"
Expand Down

0 comments on commit 1d9e692

Please sign in to comment.