diff options
| author | Reinhard Tartler <siretart@tauware.de> | 2009-04-30 21:08:53 +0000 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2009-08-11 20:36:39 +0000 |
| commit | c8e20ba6dfab0d84ceb57e8b942c6769f72b507a (patch) | |
| tree | 8a6644aba197c36dbf086b39fd978368842d0b6f /tokenize.c | |
| parent | 2ceccd7b956b6588f2faa566b64249605ae52ceb (diff) | |
| download | sparse-dev-c8e20ba6dfab0d84ceb57e8b942c6769f72b507a.tar.gz | |
show_token: handle TOKEN_UNTAINT and TOKEN_ARG_COUNT types
These cases are probably never hit with "regular" codepaths, but are
useful when called in a gdb session to print token sequences.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'tokenize.c')
| -rw-r--r-- | tokenize.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -162,9 +162,18 @@ const char *show_token(const struct token *token) case TOKEN_STREAMEND: sprintf(buffer, "<end of '%s'>", stream_name(token->pos.stream)); return buffer; - + + case TOKEN_UNTAINT: + sprintf(buffer, "<untaint>"); + return buffer; + + case TOKEN_ARG_COUNT: + sprintf(buffer, "<argcnt>"); + return buffer; + default: - return "WTF???"; + sprintf(buffer, "unhandled token type '%d' ", token_type(token)); + return buffer; } } |
