aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorLaytan <laytanlaats@hotmail.com>2025-01-15 10:37:15 +0100
committerGitHub <noreply@github.com>2025-01-15 10:37:15 +0100
commit0cb04f5153548df6e6699d0bd40695b288165f69 (patch)
treee37a89fe9b00f0349273adfcd803d8c657782871 /src/main.cpp
parent432c49e214ae2c4c7352302b07541ad2bf9e3fce (diff)
parent794e812932fb291e5dc8157e06e8a132c8231e17 (diff)
Merge pull request #4691 from harold-b/fix-unused-define-crash-when-ignore-warnins
Fixes crash when unused defines are used in conjunction with `-ignore-warnings`
Diffstat (limited to 'src/main.cpp')
-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");
+ }
}
}
}