[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Current trunk is broken for MinGW, patches included
From: |
Gavin Smith |
Subject: |
Re: Current trunk is broken for MinGW, patches included |
Date: |
Sun, 28 Dec 2014 20:13:28 +0000 |
On Thu, Dec 25, 2014 at 5:58 PM, Eli Zaretskii <address@hidden> wrote:
>> All the documentation I have looked at for "iconv" doesn't show
>> "const" for any of the arguments.
>
> I have in my include/iconv.h:
>
> #ifndef LIBICONV_PLUG
> #define iconv libiconv
> #endif
> extern size_t iconv (iconv_t cd, const char* * inbuf, size_t *inbytesleft,
> char* * outbuf, size_t *outbytesleft);
>
> Here are the warnings I get:
>
> info-utils.c: In function 'copy_converting':
> info-utils.c:915:30: warning: passing argument 2 of 'libiconv' from
> incompatible pointer type [enabled by default]
> In file included from info-utils.h:30:0,
> from info-utils.c:24:
> d:\usr\bin\../lib/gcc/mingw32/4.7.2/../../../../include/iconv.h:83:15:
> note: expected 'const char **' but argument is of type 'char **'
>
> info-utils.c: In function 'text_buffer_iconv':
> info-utils.c:1969:22: warning: passing argument 2 of 'libiconv' from
> incompatible pointer type [enabled by default]
> In file included from info-utils.h:30:0,
> from info-utils.c:24:
> d:\usr\bin\../lib/gcc/mingw32/4.7.2/../../../../include/iconv.h:83:15:
> note: expected 'const char **' but argument is of type 'char **'
>
This appears to be an issue with varying implementations/standards.
Later standards declare the parameter as a 'char **', presumably
because char ** doesn't convert to const char **. We could always
stick a cast in there if the warning is a problem.
References:
http://pubs.opengroup.org/onlinepubs/009695399/functions/iconv.html
https://sourceware.org/bugzilla/show_bug.cgi?id=2962
- Current trunk is broken for MinGW, patches included, Eli Zaretskii, 2014/12/24
- Re: Current trunk is broken for MinGW, patches included, Gavin Smith, 2014/12/24
- Re: Current trunk is broken for MinGW, patches included, Gavin Smith, 2014/12/25
- Re: Current trunk is broken for MinGW, patches included, Gavin Smith, 2014/12/25
- Re: Current trunk is broken for MinGW, patches included, Eli Zaretskii, 2014/12/25
- Re: Current trunk is broken for MinGW, patches included,
Gavin Smith <=
- Re: Current trunk is broken for MinGW, patches included, Eli Zaretskii, 2014/12/28
- Re: Current trunk is broken for MinGW, patches included, Werner LEMBERG, 2014/12/28
- Re: Current trunk is broken for MinGW, patches included, Eli Zaretskii, 2014/12/29