{"thread":{"id":"21866","subject":"[PATCH] Cast &cp to eliminate a compile-time warning on FreeBSD 8-STABLE.","startedAt":"2009-12-04T23:12:02Z","lastAt":"2009-12-05T23:03:50Z","messageCount":3,"participants":["James P. Howard, II","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"129250","messageId":"1259968322-66072-1-git-send-email-jh@jameshoward.us","threadId":"21866","inReplyTo":null,"subject":"[PATCH] Cast &cp to eliminate a compile-time warning on FreeBSD 8-STABLE.","fromName":"James P. Howard, II","fromEmail":"jh@jameshoward.us","sentAt":"2009-12-04T23:12:02Z","receivedAt":"2009-12-04T23:12:02Z","isPatch":true,"sender":{"key":"jh@jameshoward.us","avatar":"https://avatars.githubusercontent.com/u/156522?v=4"},"body":"Signed-off-by: James P. Howard, II <jh@jameshoward.us>\n---\n utf8.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/utf8.c b/utf8.c\nindex 7ddff23..a6cc280 100644\n--- a/utf8.c\n+++ b/utf8.c\n@@ -449,7 +449,7 @@ char *reencode_string(const char *in, const char *out_encoding, const char *in_e\n \tcp = (iconv_ibp)in;\n \n \twhile (1) {\n-\t\tsize_t cnt = iconv(conv, &cp, &insz, &outpos, &outsz);\n+\t\tsize_t cnt = iconv(conv, (const char **)&cp, &insz, &outpos, &outsz);\n \n \t\tif (cnt == -1) {\n \t\t\tsize_t sofar;\n-- \n1.6.5.3\n"},{"id":"129274","messageId":"20091205161405.GA9272@sigill.intra.peff.net","threadId":"21866","inReplyTo":"1259968322-66072-1-git-send-email-jh@jameshoward.us","subject":"Re: [PATCH] Cast &cp to eliminate a compile-time warning on FreeBSD 8-STABLE.","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-12-05T16:14:05Z","receivedAt":"2009-12-05T16:14:05Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Dec 04, 2009 at 06:12:02PM -0500, James P. Howard, II wrote:\n\n> --- a/utf8.c\n> +++ b/utf8.c\n> @@ -449,7 +449,7 @@ char *reencode_string(const char *in, const char *out_encoding, const char *in_e\n>  \tcp = (iconv_ibp)in;\n>  \n>  \twhile (1) {\n> -\t\tsize_t cnt = iconv(conv, &cp, &insz, &outpos, &outsz);\n> +\t\tsize_t cnt = iconv(conv, (const char **)&cp, &insz, &outpos, &outsz);\n>  \n>  \t\tif (cnt == -1) {\n>  \t\t\tsize_t sofar;\n\nAren't you now introducing a warning for all of the other platforms\nwhich take a \"char **\"? Should you instead just be building with\nOLD_ICONV=Yes on your platform? See commit fd547a9 for details.\n\n-Peff\n"},{"id":"129300","messageId":"20091205230350.GA3810@thermopylae.local","threadId":"21866","inReplyTo":"20091205161405.GA9272@sigill.intra.peff.net","subject":"Re: [PATCH] Cast &cp to eliminate a compile-time warning on FreeBSD 8-STABLE.","fromName":"James P. Howard, II","fromEmail":"jh@jameshoward.us","sentAt":"2009-12-05T23:03:50Z","receivedAt":"2009-12-05T23:03:50Z","isPatch":true,"sender":{"key":"jh@jameshoward.us","avatar":"https://avatars.githubusercontent.com/u/156522?v=4"},"body":"On Sat, Dec 05, 2009 at 11:14:05AM -0500, Jeff King wrote:\n\n> On Fri, Dec 04, 2009 at 06:12:02PM -0500, James P. Howard, II wrote:\n> \n> > --- a/utf8.c\n> > +++ b/utf8.c\n> > @@ -449,7 +449,7 @@ char *reencode_string(const char *in, const char *out_encoding, const char *in_e\n> >  \tcp = (iconv_ibp)in;\n> >  \n> >  \twhile (1) {\n> > -\t\tsize_t cnt = iconv(conv, &cp, &insz, &outpos, &outsz);\n> > +\t\tsize_t cnt = iconv(conv, (const char **)&cp, &insz, &outpos, &outsz);\n> >  \n> >  \t\tif (cnt == -1) {\n> >  \t\t\tsize_t sofar;\n> \n> Aren't you now introducing a warning for all of the other platforms\n> which take a \"char **\"? Should you instead just be building with\n> OLD_ICONV=Yes on your platform? See commit fd547a9 for details.\n\nYes, and it was brought to my attention within 10 minutes of my first\npost.\n\nJames\n\n-- \nJames P. Howard, II, MPA MBCS\njh@jameshoward.us\n"}]}