[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] readline warning fixes
From: |
Elias Athanasopoulos |
Subject: |
Re: [PATCH] readline warning fixes |
Date: |
Fri, 3 Jan 2003 21:03:04 +0200 |
User-agent: |
Mutt/1.2.5i |
Hello Elena,
On Thu, Jan 02, 2003 at 07:20:09PM -0500, Elena Zannoni wrote:
> > On Sat, Dec 14, 2002 at 01:53:55PM +0200, Elias Athanasopoulos wrote:
> > > Some warning fixes to readline. BTW, shouldn't comments end in a
> > [snipped]
> > > 2002-12-14 Elias Athanasopoulos <eathan@otenet.gr>
> > >
> > > * histexpand.c (get_history_event): Cast const char * to char *
> > > to avoid compiler warnings.
> > > * display.c (_rl_move_cursor_relative): Likewise.
> >
> > Anyone has a comment to this patch?
>
> It should be submitted to the readline maintainer, or the readline
> bug mailing list:
> bug-readline@gnu.org
> Once it is accepted into the official readline, I wouldn't mind
> to have it in the gdb version of readline as well.
Thank you. My original post is attached below.
Regards,
Elias
Hello!
Some warning fixes to readline. BTW, shouldn't comments end in a
period followed by two spaces?
Regards,
Elias
readline/ChangeLog
2002-12-14 Elias Athanasopoulos <eathan@otenet.gr>
* histexpand.c (get_history_event): Cast const char * to char *
to avoid compiler warnings.
* display.c (_rl_move_cursor_relative): Likewise.
===================================================================
RCS file: /home/anteater/bucvs/src/readline/histexpand.c,v
retrieving revision 1.1
diff -pu -r1.1 /home/anteater/bucvs/src/readline/histexpand.c
--- /home/anteater/bucvs/src/readline/histexpand.c 2002/12/14 11:35:29
1.1
+++ /home/anteater/bucvs/src/readline/histexpand.c 2002/12/14 11:36:59
@@ -209,10 +209,9 @@ get_history_event (string, caller_index,
mbstate_t ps;
memset (&ps, 0, sizeof (mbstate_t));
- /* These produce warnings because we're passing a const string to a
- function that takes a non-const string. */
- _rl_adjust_point (string, i, &ps);
- if ((v = _rl_get_char_len (string + i, &ps)) > 1)
+ /* Cast 'string' to non-const string to avoid compiler warnings. */
+ _rl_adjust_point ((char *) string, i, &ps);
+ if ((v = _rl_get_char_len ((char *) string + i, &ps)) > 1)
{
i += v - 1;
continue;
===================================================================
RCS file: /home/anteater/bucvs/src/readline/display.c,v
retrieving revision 1.1
diff -pu -r1.1 /home/anteater/bucvs/src/readline/display.c
--- /home/anteater/bucvs/src/readline/display.c 2002/12/14 11:38:11 1.1
+++ /home/anteater/bucvs/src/readline/display.c 2002/12/14 11:40:57
@@ -1608,7 +1608,7 @@ _rl_move_cursor_relative (new, data)
}
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_last_c_pos = _rl_col_width (data, 0, new);
+ _rl_last_c_pos = _rl_col_width ((char *) data, 0, new);
else
_rl_last_c_pos = new;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] readline warning fixes,
Elias Athanasopoulos <=