aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarold Brenes <harold@hbrenes.com>2025-01-15 02:04:49 -0500
committerHarold Brenes <harold@hbrenes.com>2025-01-15 02:04:49 -0500
commit794e812932fb291e5dc8157e06e8a132c8231e17 (patch)
treee37a89fe9b00f0349273adfcd803d8c657782871 /src
parent432c49e214ae2c4c7352302b07541ad2bf9e3fce (diff)
Fixes crash when unused defines are used in conjunction with `-ignore-warnings`.
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp5
1 files changed, 4 insertions, 1 deletions
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");
+ }
}
}
}