From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21299 invoked by alias); 14 Dec 2002 10:32:26 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21276 invoked from network); 14 Dec 2002 10:32:21 -0000 Received: from unknown (HELO mailsrv.otenet.gr) (195.170.0.5) by sources.redhat.com with SMTP; 14 Dec 2002 10:32:21 -0000 Received: from neutrino.particles.org (athe535-d017.otenet.gr [62.103.187.17]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id gBEAW8Qk024541 for ; Sat, 14 Dec 2002 12:32:15 +0200 (EET) Received: (from anteater@localhost) by neutrino.particles.org (8.11.6/8.11.6) id gBEBruN26284 for gdb-patches@sources.redhat.com; Sat, 14 Dec 2002 13:53:56 +0200 Date: Sat, 14 Dec 2002 02:48:00 -0000 From: Elias Athanasopoulos To: gdb-patches@sources.redhat.com Subject: [PATCH] readline warning fixes Message-ID: <20021214135355.A1147@neutrino.particles.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-SW-Source: 2002-12/txt/msg00444.txt.bz2 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 * 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; }