summaryrefslogtreecommitdiff
path: root/err.c
diff options
context:
space:
mode:
Diffstat (limited to 'err.c')
-rw-r--r--err.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/err.c b/err.c
index 1a78e64..334fa69 100644
--- a/err.c
+++ b/err.c
@@ -238,6 +238,14 @@ static void warn_print_(
va_list args;
ErrCtx *ctx = where.file->ctx;
if (!ctx->enabled) return;
+ if (where.file) {
+ /* check if there's a #no_warn directive */
+ U32 *no_warn_lines = where.file->no_warn_lines;
+ if (bsearch_u32(no_warn_lines, arr_len(no_warn_lines), where.file->tokens[where.start].pos.line)) {
+ /* yes there is */
+ return;
+ }
+ }
#if ERR_SHOW_SOURCE_LOCATION
if (file)
err_fprint(ctx, "Generated by line %d of %s:\n", line, file);