diff options
| author | Harold Brenes <harold@hbrenes.com> | 2025-01-15 02:04:49 -0500 |
|---|---|---|
| committer | Harold Brenes <harold@hbrenes.com> | 2025-01-15 02:04:49 -0500 |
| commit | 794e812932fb291e5dc8157e06e8a132c8231e17 (patch) | |
| tree | e37a89fe9b00f0349273adfcd803d8c657782871 /src/main.cpp | |
| parent | 432c49e214ae2c4c7352302b07541ad2bf9e3fce (diff) | |
Fixes crash when unused defines are used in conjunction with `-ignore-warnings`.
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
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"); + } } } } |