[PATCH] show_token: handle TOKEN_UNTAINT and TOKEN_ARG_COUNT types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 tokenize.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/tokenize.c b/tokenize.c
index 6b67b96..93dd007 100644
--- a/tokenize.c
+++ b/tokenize.c
@@ -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;
 	}
 }

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux