This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Avoid "format not a string literal" warnings
- From: Pedro Alves <palves at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 13 Apr 2016 21:25:43 +0100
- Subject: Re: [PATCH] Avoid "format not a string literal" warnings
- Authentication-results: sourceware.org; auth=none
- References: <1460574365-21910-1-git-send-email-palves at redhat dot com> <8737qpp8sg dot fsf at redhat dot com>
On 04/13/2016 09:12 PM, Sergio Durigan Junior wrote:
>> if (alias_argv[0] == NULL || command_argv[0] == NULL
>> || *alias_argv[0] == '\0' || *command_argv[0] == '\0')
>> - error (_(usage));
>> + alias_usage_error ();
>
> I'd call error directly here and above (and yes, replicate the message),
> but that is a matter of personal taste.
OOC, is there a reason for that preference?
Instead of replicating the message, I also thought of:
error (("%s"), usage);
but it seems slightly nicer to me the way I wrote it ( obviously :-) ).
> LGTM.
Thanks,
Pedro Alves