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
Jeff King <peff@peff.net>
Date
Dec 5, 2009, 16:14 UTC
Message-ID
<20091205161405.GA9272@sigill.intra.peff.net>
In-Reply-To
<1259968322-66072-1-git-send-email-jh@jameshoward.us>
On Fri, Dec 04, 2009 at 06:12:02PM -0500, James P. Howard, II wrote:
Show 11 quoted lines
> --- 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.

-Peff
Previous: James P. Howard, IINext: James P. Howard, II
Message 2 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.