diff options
| author | christos <christos@NetBSD.org> | 2001-01-04 15:55:53 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2001-01-04 15:55:53 +0000 |
| commit | ab7e5eaeb3267e41ca10ec8794f53609dae55da5 (patch) | |
| tree | 21710e0d7cef993e5ce02d96688deeab43bd90bd /lib/libedit | |
| parent | ed19c5fdb037a40ccfc395e2fed54830215bbf1b (diff) | |
fix lint problems.
Diffstat (limited to 'lib/libedit')
| -rw-r--r-- | lib/libedit/readline.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libedit/readline.c b/lib/libedit/readline.c index 84b9be4e9ab..192ae6e5b71 100644 --- a/lib/libedit/readline.c +++ b/lib/libedit/readline.c @@ -1,4 +1,4 @@ -/* $NetBSD: readline.c,v 1.15 2001/01/01 15:52:25 jdolecek Exp $ */ +/* $NetBSD: readline.c,v 1.16 2001/01/04 15:55:53 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: readline.c,v 1.15 2001/01/01 15:52:25 jdolecek Exp $"); +__RCSID("$NetBSD: readline.c,v 1.16 2001/01/04 15:55:53 christos Exp $"); #endif /* not lint && not SCCSID */ #include <sys/types.h> @@ -1362,7 +1362,9 @@ static int _rl_qsort_string_compare(i1, i2) const void *i1, *i2; { + /*LINTED const castaway*/ const char *s1 = ((const char **)i1)[0]; + /*LINTED const castaway*/ const char *s2 = ((const char **)i2)[0]; return strcasecmp(s1, s2); @@ -1395,7 +1397,8 @@ rl_display_match_list (matches, len, max) count++; /* Sort the items if they are not already sorted. */ - qsort(&matches[1], len-1, sizeof(char *), _rl_qsort_string_compare); + qsort(&matches[1], (size_t)(len - 1), sizeof(char *), + _rl_qsort_string_compare); idx = 1; for(; count > 0; count--) { @@ -1436,7 +1439,7 @@ rl_complete_internal(int what_to_do) /* We now look backwards for the start of a filename/variable word */ li = el_line(e); - ctemp = (char *) li->cursor; + ctemp = (const char *) li->cursor; while (ctemp > li->buffer && !strchr(rl_basic_word_break_characters, ctemp[-1]) && (!rl_special_prefixes |
