This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: eliminate warnings in printcmd.c
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ben Elliston <bje at au1 dot ibm dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 9 Dec 2004 23:30:55 -0500
- Subject: Re: eliminate warnings in printcmd.c
- References: <20041210040650.GB30314@namadgi>
On Fri, Dec 10, 2004 at 03:06:50PM +1100, Ben Elliston wrote:
> This patch eliminates warnings whereby the format string is not a
> string literal and GCC cannot check it at compile-time. I don't
> expect this patch to be tremendously popular, but my hope is that it
> will stimulate some discussion on how to really fix it :-)
It wouldn't be hard to do. The flow of printf_command is fairly
simple; part of each substring could be replaced by puts, and the rest
by printf with fixed format strings using %*.*. You're welcome to
implement that ;-)
--
Daniel Jacobowitz