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

Re: [PATCH] Cast &cp to eliminate a compile-time warning on FreeBSD 8-STABLE.

From
James P. Howard, II <jh@jameshoward.us>
Date
Dec 5, 2009, 23:03 UTC
Message-ID
<20091205230350.GA3810@thermopylae.local>
In-Reply-To
<20091205161405.GA9272@sigill.intra.peff.net>
On Sat, Dec 05, 2009 at 11:14:05AM -0500, Jeff King wrote:
Show 17 quoted lines
> On Fri, Dec 04, 2009 at 06:12:02PM -0500, James P. Howard, II wrote:
> 
> > --- a/utf8.c
> > +++ b/utf8.c
> > @@ -449,7 +449,7 @@ char *reencode_string(const char *in, const char *out_encoding, const char *in_e
> >  	cp = (iconv_ibp)in;
> >  
> >  	while (1) {
> > -		size_t cnt = iconv(conv, &cp, &insz, &outpos, &outsz);
> > +		size_t cnt = iconv(conv, (const char **)&cp, &insz, &outpos, &outsz);
> >  
> >  		if (cnt == -1) {
> >  			size_t sofar;
> 
> Aren't you now introducing a warning for all of the other platforms
> which take a "char **"? Should you instead just be building with
> OLD_ICONV=Yes on your platform? See commit fd547a9 for details.

Yes, and it was brought to my attention within 10 minutes of my first post.

James
-- 
James P. Howard, II, MPA MBCS
jh@jameshoward.us
Previous: Jeff King
Message 3 of 3 in “Cast &cp to eliminate a compile-time warning on FreeBSD 8-STABLE.”
  1. Cast &cp to eliminate a compile-time warning on FreeBSD 8-STABLE.James P. Howard, II, Dec 4, 2009
  2. Jeff KingDec 5, 2009
  3. James P. Howard, IIDec 5, 2009

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.