diff options
author | Keith Packard <keithp@keithp.com> | 2019-01-03 11:41:49 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2019-01-03 12:09:58 -0800 |
commit | 6f729ff46b2f4531db68f0af85e7e9fe0f6d1969 (patch) | |
tree | d0a93a48bd3012decbb230f5aa17ecc6c793cad2 /ao-tools/ao-test-gps | |
parent | f14c799ae7ff3be56c28f5694f04c03daff7708e (diff) |
ao-tools: Fix warnings in ao-tools
None of these appear likely to have caused actual problems.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/ao-test-gps')
-rw-r--r-- | ao-tools/ao-test-gps/ao-test-gps.c | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/ao-tools/ao-test-gps/ao-test-gps.c b/ao-tools/ao-test-gps/ao-test-gps.c index 5012028c..09ad3e8c 100644 --- a/ao-tools/ao-test-gps/ao-test-gps.c +++ b/ao-tools/ao-test-gps/ao-test-gps.c @@ -47,7 +47,7 @@ static void usage(char *program) exit(1); } -void +static void done(struct cc_usb *cc, int code) { /* cc_usb_printf(cc, "a\n"); */ @@ -55,28 +55,6 @@ done(struct cc_usb *cc, int code) exit (code); } -static int -ends_with(char *whole, char *suffix) -{ - int whole_len = strlen(whole); - int suffix_len = strlen(suffix); - - if (suffix_len > whole_len) - return 0; - return strcmp(whole + whole_len - suffix_len, suffix) == 0; -} - -static int -starts_with(char *whole, char *prefix) -{ - int whole_len = strlen(whole); - int prefix_len = strlen(prefix); - - if (prefix_len > whole_len) - return 0; - return strncmp(whole, prefix, prefix_len) == 0; -} - static char ** tok(char *line) { char **strs = malloc (sizeof (char *)), *str; @@ -140,16 +118,15 @@ free_gps(struct gps *b) { } } -char ** +static char ** find_gps(struct gps *b, char *word0) { - int i; for (;b; b = b->next) if (b->strs[0] && !strcmp(b->strs[0], word0)) return b->strs; return NULL; } -int +static int do_gps(struct cc_usb *usb) { int count = 0; @@ -186,15 +163,9 @@ int main (int argc, char **argv) { char *device = NULL; - char *filename; - Elf *e; - unsigned int s; - int i; int c; - int tries; struct cc_usb *cc = NULL; char *tty = NULL; - int success; int verbose = 0; int ret = 0; |