From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Avoid "format not a string literal" warnings
Date: Wed, 13 Apr 2016 21:03:00 -0000 [thread overview]
Message-ID: <87y48hnrw8.fsf@redhat.com> (raw)
In-Reply-To: <570EAB47.8040102@redhat.com> (Pedro Alves's message of "Wed, 13 Apr 2016 21:25:43 +0100")
On Wednesday, April 13 2016, Pedro Alves wrote:
> 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?
Just avoiding a one-line-function call, and the fact that the message is
replicated just twice and will likely not change.
> 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 :-) ).
For sure. I'd say go ahead with your way, no reason to bikeshed over
this :-).
Thanks for the patch.
Cheers,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
next prev parent reply other threads:[~2016-04-13 21:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-13 19:06 Pedro Alves
2016-04-13 20:13 ` Sergio Durigan Junior
2016-04-13 20:25 ` Pedro Alves
2016-04-13 21:03 ` Sergio Durigan Junior [this message]
2016-04-14 12:03 ` Pedro Alves
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=87y48hnrw8.fsf@redhat.com \
--to=sergiodj@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@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