Remove the write-only variable diagnostic_count.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 13 Jun 2012 07:00:10 +0000 (09:00 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 14 Jun 2012 07:32:56 +0000 (09:32 +0200)
diagnostic.c
diagnostic.h
parser.c

index 59db260..65ba449 100644 (file)
@@ -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);
index 36b57b9..8b5ef77 100644 (file)
@@ -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 */
index 9dadbf6..b4bf38b 100644 (file)
--- 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;