Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] readline warning fixes
@ 2002-12-14  2:48 Elias Athanasopoulos
  2003-01-02 23:34 ` Elias Athanasopoulos
  0 siblings, 1 reply; 3+ messages in thread
From: Elias Athanasopoulos @ 2002-12-14  2:48 UTC (permalink / raw)
  To: gdb-patches

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;
 }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] readline warning fixes
  2002-12-14  2:48 [PATCH] readline warning fixes Elias Athanasopoulos
@ 2003-01-02 23:34 ` Elias Athanasopoulos
  2003-01-03  0:16   ` Elena Zannoni
  0 siblings, 1 reply; 3+ messages in thread
From: Elias Athanasopoulos @ 2003-01-02 23:34 UTC (permalink / raw)
  To: gdb-patches

Hello and a happy new year!

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?

Regards,
Elias


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] readline warning fixes
  2003-01-02 23:34 ` Elias Athanasopoulos
@ 2003-01-03  0:16   ` Elena Zannoni
  0 siblings, 0 replies; 3+ messages in thread
From: Elena Zannoni @ 2003-01-03  0:16 UTC (permalink / raw)
  To: Elias Athanasopoulos; +Cc: gdb-patches

Elias Athanasopoulos writes:
 > Hello and a happy new year!
 > 
 > 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?
 > 
 > Regards,
 > Elias


It should be submitted to the readline maintainer, or the readline
bug mailing list:

Bug reports for Readline should be sent to:

        bug-readline@gnu.org

If you would like to contact the Readline maintainer directly, send mail
to bash-maintainers@gnu.org.

or: bug-bash@gnu.org

(see readline/README).

Once it is accepted into the official readline, I wouldn't mind
to have it in the gdb version of readline as well.

Elena


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-03  0:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-14  2:48 [PATCH] readline warning fixes Elias Athanasopoulos
2003-01-02 23:34 ` Elias Athanasopoulos
2003-01-03  0:16   ` Elena Zannoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox