git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/2] add --recode-patch option to git-mailinfo

From
Zhang Le <r0bertz@gentoo.org>
Date
Jun 14, 2010, 05:49 UTC
Message-ID
<20100614054941.GA28218@adriano>
In-Reply-To
<7vvd9mb2kc.fsf@alter.siamese.dyndns.org>
On 22:33 Sun 13 Jun     , Junio C Hamano wrote:
Show 19 quoted lines
> 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
Previous: Junio C Hamano
Message 4 of 4 in “add --recode-patch option to git-mailinfo”
  1. 1/2 add --recode-patch option to git-mailinfoZhang Le, Jun 13, 2010
  2. 2/2 add --recode-patch option to git-amZhang Le, Jun 13, 2010
  3. Junio C HamanoJun 14, 2010
  4. Zhang LeJun 14, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.