From: Rocco Rutte Date: Wed, 02 Aug 2006 08:53:30 GMT Subject: Re: [PATCH 8/10] Fix some minor warnings to allow -Werror. Message-ID: <20060802085330.GA6595@peter.daprodeges.fqdn.th-h.de> In-Reply-To: <7vvepbvauo.fsf@assigned-by-dhcp.cox.net> Hi, * Junio C Hamano [06-08-02 00:46:23 -0700] wrote: [...] >This kills the compilation with: > >gcc -o builtin-mailinfo.o -c -O2 -Werror -ansi -pedantic -std=c99 -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wall -Wdeclaration-after-statement -g -DSHA1_HEADER='' -DNO_STRLCPY builtin-mailinfo.c >cc1: warnings being treated as errors >builtin-mailinfo.c: In function 'convert_to_utf8': >builtin-mailinfo.c:561: warning: passing argument 2 of 'iconv' from incompatible pointer type > >where the line 561 reads: > > nrc = iconv(conv, &in, &insize, &out, &outsize); It depends on the iconv() implementation as what the input pointer is defined: some use just 'char*' while others use 'const char*' (GNU libiconv IIRC). bye, Rocco -- :wq!