From: Zhang Le <r0bertz@gentoo.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2 1/2] add --recode-patch option to git-mailinfo
Date: Mon, 14 Jun 2010 13:49:41 +0800 [thread overview]
Message-ID: <20100614054941.GA28218@adriano> (raw)
In-Reply-To: <7vvd9mb2kc.fsf@alter.siamese.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]
On 22:33 Sun 13 Jun , Junio C Hamano wrote:
> Zhang Le <r0bertz@gentoo.org> writes:
>
> > diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
> > index 4a9729b..73f51f3 100644
> > --- a/builtin/mailinfo.c
> > +++ b/builtin/mailinfo.c
> > @@ -830,6 +831,8 @@ static int handle_commit_msg(struct strbuf *line)
> >
> > static void handle_patch(const struct strbuf *line)
> > {
> > + if (recode_patch)
> > + convert_to_utf8(line, charset.buf);
>
> builtin/mailinfo.c: In function 'handle_patch':
> builtin/mailinfo.c:835: error: passing argument 1 of 'convert_to_utf8' discards qualifiers from pointer target type
>
> I do not think there is a reason for "line" to be const anymore; it used
> to make sense back when handle_patch() was only about writing the patch
> out, but that no longer is the case.
So you have used -Werror, right?
Because my gcc (4.4.3) only shows a warning.
Will fix it.
My gcc also shows another warning:
builtin/mailinfo.c:836: warning: ignoring return value of 'fwrite', declared
with attribute warn_unused_result
Does it occur to you as well?
--
Zhang, Le
Gentoo/Loongson Developer
http://zhangle.is-a-geek.org
0260 C902 B8F8 6506 6586 2B90 BC51 C808 1E4E 2973
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
prev parent reply other threads:[~2010-06-14 5:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-13 18:50 [PATCH v2 1/2] add --recode-patch option to git-mailinfo Zhang Le
2010-06-13 18:50 ` [PATCH v2 2/2] add --recode-patch option to git-am Zhang Le
2010-06-14 5:33 ` [PATCH v2 1/2] add --recode-patch option to git-mailinfo Junio C Hamano
2010-06-14 5:49 ` Zhang Le [this message]
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=20100614054941.GA28218@adriano \
--to=r0bertz@gentoo.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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 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.