From f1328c63a778a4b0227ced90b16ed71426d93f6d Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 13 Jun 2012 09:00:10 +0200 Subject: [PATCH] Remove the write-only variable diagnostic_count. --- diagnostic.c | 3 --- diagnostic.h | 1 - parser.c | 1 - 3 files changed, 5 deletions(-) diff --git a/diagnostic.c b/diagnostic.c index 59db260..65ba449 100644 --- a/diagnostic.c +++ b/diagnostic.c @@ -29,8 +29,6 @@ #include "type.h" #include "warning.h" -/** Number of occurred diagnostics. */ -unsigned diagnostic_count = 0; /** Number of occurred errors. */ unsigned error_count = 0; /** Number of occurred warnings. */ @@ -221,7 +219,6 @@ void diagnosticf(const char *const fmt, ...) { va_list ap; va_start(ap, fmt); - ++diagnostic_count; curr_pos = NULL; diagnosticvf(fmt, ap); va_end(ap); diff --git a/diagnostic.h b/diagnostic.h index 36b57b9..8b5ef77 100644 --- a/diagnostic.h +++ b/diagnostic.h @@ -63,7 +63,6 @@ void errorf(const source_position_t *pos, const char *fmt, ...); void warningf(warning_t, const source_position_t *pos, const char *fmt, ...); NORETURN internal_errorf(const source_position_t *pos, const char *fmt, ...); -extern unsigned diagnostic_count; extern unsigned error_count; extern unsigned warning_count; extern bool show_column; /**< Show column in diagnostic messages */ diff --git a/parser.c b/parser.c index 9dadbf6..b4bf38b 100644 --- a/parser.c +++ b/parser.c @@ -10170,7 +10170,6 @@ void start_parsing(void) { environment_stack = NEW_ARR_F(stack_entry_t, 0); label_stack = NEW_ARR_F(stack_entry_t, 0); - diagnostic_count = 0; error_count = 0; warning_count = 0; -- 2.20.1