This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] readline/search.c: Remove useless parameter '0' for rl_message()
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Chen Gang <gang dot chen dot 5i5j at gmail dot com>, bug-readline at gnu dot org
- Cc: amodra at gmail dot com, Pedro Alves <palves at redhat dot com>, jan dot kratochvil at redhat dot com, drow at false dot org, ezannoni at kwikemart dot cygnus dot com, muller at sourceware dot org, Nicholas Clifton <nickc at redhat dot com>, gdb-patches at sourceware dot org, binutils at sourceware dot org, macro at linux-mips dot org
- Date: Mon, 22 Sep 2014 09:03:24 -0400
- Subject: Re: [PATCH] readline/search.c: Remove useless parameter '0' for rl_message()
- Authentication-results: sourceware.org; auth=none
- References: <541CF976 dot 8090905 at gmail dot com>
Hi Chen,
> The related warning under Darwin x86_64:
>
> gcc -c -DHAVE_CONFIG_H -I. -I../../binutils-gdb/readline -DRL_LIBRARY_VERSION='"6.2"' -g -O2 ../../binutils-gdb/readline/search.c
> ../../binutils-gdb/readline/search.c:213:24: warning: data argument not used by format string [-Wformat-extra-args]
> rl_message ("%s", p, 0);
> ~~~~ ^
> 1 warning generated.
>
>
> readline/ChangeLog.gdb:
>
> * search.c (_rl_nsearch_init): Remove useless parameter '0' for
> rl_message().
Because readline is a separate project from binutils/GDB, we prefer
it if you would first submit the patch to the readline project first
(bug-readline@gnu.org, in Cc: of this email), get it accepted there.
Once pushed in the readline project, we can then merge your patch.
Would you mind taking the lead in telling us when the patch is readline?
Thank you!
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
> readline/search.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/readline/search.c b/readline/search.c
> index 04468fc..bf525e6 100644
> --- a/readline/search.c
> +++ b/readline/search.c
> @@ -210,7 +210,7 @@ _rl_nsearch_init (dir, pchar)
> rl_end = rl_point = 0;
>
> p = _rl_make_prompt_for_search (pchar ? pchar : ':');
> - rl_message ("%s", p, 0);
> + rl_message ("%s", p);
> xfree (p);
>
> RL_SETSTATE(RL_STATE_NSEARCH);
> --
> 1.8.5.2 (Apple Git-48)
--
Joel