Git development
 help / color / mirror / Atom feed
* [PATCH] Cast &cp to eliminate a compile-time warning on FreeBSD 8-STABLE.
@ 2009-12-04 23:12 James P. Howard, II
  2009-12-05 16:14 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: James P. Howard, II @ 2009-12-04 23:12 UTC (permalink / raw)
  To: git; +Cc: James P. Howard, II

Signed-off-by: James P. Howard, II <jh@jameshoward.us>
---
 utf8.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/utf8.c b/utf8.c
index 7ddff23..a6cc280 100644
--- 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;
-- 
1.6.5.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Cast &cp to eliminate a compile-time warning on FreeBSD 8-STABLE.
  2009-12-04 23:12 [PATCH] Cast &cp to eliminate a compile-time warning on FreeBSD 8-STABLE James P. Howard, II
@ 2009-12-05 16:14 ` Jeff King
  2009-12-05 23:03   ` James P. Howard, II
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2009-12-05 16:14 UTC (permalink / raw)
  To: James P. Howard, II; +Cc: git

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.

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Cast &cp to eliminate a compile-time warning on FreeBSD 8-STABLE.
  2009-12-05 16:14 ` Jeff King
@ 2009-12-05 23:03   ` James P. Howard, II
  0 siblings, 0 replies; 3+ messages in thread
From: James P. Howard, II @ 2009-12-05 23:03 UTC (permalink / raw)
  To: Jeff King; +Cc: git

On Sat, Dec 05, 2009 at 11:14:05AM -0500, Jeff King wrote:

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-05 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-04 23:12 [PATCH] Cast &cp to eliminate a compile-time warning on FreeBSD 8-STABLE James P. Howard, II
2009-12-05 16:14 ` Jeff King
2009-12-05 23:03   ` James P. Howard, II

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox