From 794e812932fb291e5dc8157e06e8a132c8231e17 Mon Sep 17 00:00:00 2001 From: Harold Brenes Date: Wed, 15 Jan 2025 02:04:49 -0500 Subject: [PATCH] Fixes crash when unused defines are used in conjunction with `-ignore-warnings`. --- src/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 41c7170f6..1de5d987b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1801,7 +1801,10 @@ gb_internal void check_defines(BuildContext *bc, Checker *c) { if (!found) { ERROR_BLOCK(); warning(nullptr, "given -define:%.*s is unused in the project", LIT(name)); - error_line("\tSuggestion: use the -show-defineables flag for an overview of the possible defines\n"); + + if (!global_ignore_warnings()) { + error_line("\tSuggestion: use the -show-defineables flag for an overview of the possible defines\n"); + } } } }