Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Elias Athanasopoulos <eathan@otenet.gr>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] readline warning fixes
Date: Sat, 14 Dec 2002 02:48:00 -0000	[thread overview]
Message-ID: <20021214135355.A1147@neutrino.particles.org> (raw)

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


             reply	other threads:[~2002-12-14 10:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-14  2:48 Elias Athanasopoulos [this message]
2003-01-02 23:34 ` Elias Athanasopoulos
2003-01-03  0:16   ` Elena Zannoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021214135355.A1147@neutrino.particles.org \
    --to=eathan@otenet.gr \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox