X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=diagnostic.c;h=447ed7d784920f34952f3c3a2e09e50e97ca5739;hb=f62e85e79349d1b37a5c1f38f30d3c7bcbeebfc6;hp=b2ba266385b71c268432d3c7d2db38cd87a3c3d5;hpb=a658f09be6166f1bbb091105fec1b9bcd4a51c00;p=cparser diff --git a/diagnostic.c b/diagnostic.c index b2ba266..447ed7d 100644 --- a/diagnostic.c +++ b/diagnostic.c @@ -153,7 +153,7 @@ static void diagnosticvf(const char *const fmt, va_list ap) va_list* toks = va_arg(ap, va_list*); const char* const delimiter = va_arg(ap, const char*); for (;;) { - const token_type_t tok = va_arg(*toks, token_type_t); + const token_kind_t tok = va_arg(*toks, token_kind_t); if (tok == 0) break; if (first) { @@ -161,11 +161,11 @@ static void diagnosticvf(const char *const fmt, va_list ap) } else { fputs(delimiter, stderr); } - print_token_type(stderr, tok); + print_token_kind(stderr, tok); } } else { - const token_type_t token = va_arg(ap, token_type_t); - print_token_type(stderr, token); + const token_kind_t token = va_arg(ap, token_kind_t); + print_token_kind(stderr, token); } break; } @@ -246,7 +246,7 @@ void warningf(warning_t const warn, source_position_t const* pos, char const *co va_list ap; va_start(ap, fmt); warning_switch_t const *const s = get_warn_switch(warn); - switch (s->state) { + switch ((unsigned) s->state) { char const* kind; case WARN_STATE_ON: if (is_warn_on(WARN_ERROR)) {