From 6f729ff46b2f4531db68f0af85e7e9fe0f6d1969 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 3 Jan 2019 11:41:49 -0800 Subject: ao-tools: Fix warnings in ao-tools None of these appear likely to have caused actual problems. Signed-off-by: Keith Packard --- ao-tools/ao-dbg/ao-dbg-parse.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'ao-tools/ao-dbg/ao-dbg-parse.c') diff --git a/ao-tools/ao-dbg/ao-dbg-parse.c b/ao-tools/ao-dbg/ao-dbg-parse.c index ba691834..b61d68b8 100644 --- a/ao-tools/ao-dbg/ao-dbg-parse.c +++ b/ao-tools/ao-dbg/ao-dbg-parse.c @@ -68,41 +68,6 @@ static struct command_function functions[] = { #define TRUE 1 #endif -static int -string_to_int(char *s, int *v) -{ - char *endptr; - - if (isdigit(s[0]) || s[0] == '-' || s[0] == '+') { - *v = strtol(s, &endptr, 0); - if (endptr == s) - return FALSE; - } else if (*s == '\'') { - s++; - if (*s == '\\') { - s++; - switch (*s) { - case 'n': - *v = '\n'; - break; - case 't': - *v = '\t'; - break; - default: - *v = (int) *s; - break; - } - } else - *v = (int) *s; - s++; - if (*s != '\'') - return FALSE; - } - else - return FALSE; - return TRUE; -} - struct command_function * command_string_to_function(struct command_function *functions, char *name) { -- cgit v1.2.3