wcc: delete unused warning counters and ww err twin

This commit is contained in:
2026-08-09 04:19:22 +09:00
parent 2a03cfbfa4
commit c9425a3b46
5 changed files with 4 additions and 64 deletions

View File

@@ -1,13 +1,11 @@
/*
* Plan 9 style: short, no levels beyond fatal/error/warn, no colour.
* Plan 9 style: short, no levels beyond fatal/error, no colour.
*/
#include "ww.h"
#include <stdlib.h>
#include <string.h>
Pos noPos = { "<none>", 0, 0 };
int nerrors;
int nwarnings;
FILE *errout; /* set by main; defaults to stderr */
static FILE *
@@ -52,19 +50,4 @@ errorf(Pos p, const char *fmt, ...)
vfprintf(f, fmt, ap);
va_end(ap);
fprintf(f, "\n");
nerrors++;
}
void
warnf(Pos p, const char *fmt, ...)
{
FILE *f = out();
va_list ap;
prefix(p);
fprintf(f, "warning: ");
va_start(ap, fmt);
vfprintf(f, fmt, ap);
va_end(ap);
fprintf(f, "\n");
nwarnings++;
}