diff options
Diffstat (limited to 'err.c')
-rw-r--r-- | err.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); |