Thread (4 messages) 4 messages, 3 authors, 2016-06-15

Re: [PATCH 8/10] Fix some minor warnings to allow -Werror.

flat view

From: Rocco Rutte <hidden>
Date: 2016-06-15 22:42:35

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='<openssl/sha.h>' -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!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help