Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit fix lint problems.
details: https://anonhg.NetBSD.org/src/rev/f31c475cf871
branches: trunk
changeset: 501604:f31c475cf871
user: christos <christos%NetBSD.org@localhost>
date: Thu Jan 04 15:55:53 2001 +0000
description:
fix lint problems.
diffstat:
lib/libedit/readline.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (47 lines):
diff -r 5aa4476c8384 -r f31c475cf871 lib/libedit/readline.c
--- a/lib/libedit/readline.c Thu Jan 04 15:55:03 2001 +0000
+++ b/lib/libedit/readline.c Thu Jan 04 15:55:53 2001 +0000
@@ -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 @@
_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 @@
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 @@
/* 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
Home |
Main Index |
Thread Index |
Old Index