From: Junio C Hamano <gitster@pobox.com>
To: Vasco Almeida <vascomalmeida@sapo.pt>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
Ramsay Jones <ramsay@ramsayjones.plus.com>,
Lars Schneider <larsxschneider@gmail.com>
Subject: Re: [PATCH] i18n: config: unfold error messages marked for translation
Date: Wed, 27 Jul 2016 15:41:05 -0700 [thread overview]
Message-ID: <xmqqvazqu2ke.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1469642375-27305-1-git-send-email-vascomalmeida@sapo.pt> (Vasco Almeida's message of "Wed, 27 Jul 2016 17:59:35 +0000")
Vasco Almeida <vascomalmeida@sapo.pt> writes:
> + default:
> + error_msg = xstrfmt(_("bad config line %d in %s"),
> + cf->linenr, cf->name);
> + }
> +
> if (cf->die_on_error)
> - die(_("bad config line %d in %s %s"), cf->linenr, cf->origin_type, cf->name);
> + die(error_msg);
As error_msg is a result of xstrfmt() and there is no further
interpolation needed, you would want to say
die("%s", error_msg);
here. It triggers
config.c:541:3: error: format not a string literal and no format arguments [-Werror=format-security]
Similarly for error() below.
> else
> - return error(_("bad config line %d in %s %s"), cf->linenr, cf->origin_type, cf->name);
> + error_return = error(error_msg);
next prev parent reply other threads:[~2016-07-27 22:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 17:59 [PATCH] i18n: config: unfold error messages marked for translation Vasco Almeida
2016-07-27 20:00 ` Junio C Hamano
2016-07-28 10:38 ` Vasco Almeida
2016-07-27 22:41 ` Junio C Hamano [this message]
2016-07-28 13:14 ` [PATCH v2] " Vasco Almeida
2016-07-28 16:12 ` Junio C Hamano
2016-07-28 16:17 ` Jeff King
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=xmqqvazqu2ke.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=larsxschneider@gmail.com \
--cc=peff@peff.net \
--cc=ramsay@ramsayjones.plus.com \
--cc=vascomalmeida@sapo.pt \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.