[PATCH] Try to adapt to recent compilers such as GCC 14
Hi, with this patch applied it still fails[1] to build on i386 (Debian) for me, with mp_msg.c: In function 'filename_recode': mp_msg.c:73:29: error: passing argument 2 of 'iconv' from incompatible pointer type [-Wincompatible-pointer-types] 73 | if (iconv(inv_msgiconv, (const char **)&filename, &filename_len, | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | const char ** In file included from mp_msg.c:29: /usr/include/iconv.h:49:54: note: expected 'char ** restrict' but argument is of type 'const char **' 49 | extern size_t iconv (iconv_t __cd, char **__restrict __inbuf, | ~~~~~~~~~~~~~~~~~~^~~~~~~ mp_msg.c: In function 'mp_msg_va': mp_msg.c:236:30: error: passing argument 2 of 'iconv' from incompatible pointer type [-Wincompatible-pointer-types] 236 | while (iconv(msgiconv, (const char **)&in, &inlen, &out, &outlen) == -1) { | ^~~~~~~~~~~~~~~~~~ | | | const char ** it also fails the same way on amd64, and it's a regression as with svn38660 it builds fine. Best Regards, Lorenzo [1]https://trac.mplayerhq.hu/ticket/2424
Lorenzo wrote on Tue, 1 Oct 2024 12:52:48 +0200:
with this patch applied it still fails[1] to build on i386 (Debian) for me, with
73 | if (iconv(inv_msgiconv, (const char **)&filename, &filename_len, | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | const char **
Which patch? It's okay in current svn. Ingo
On Tue, 01 Oct 2024 14:13:36 +0200 Ingo Brückl <ib@oddnet.de> wrote:
Lorenzo wrote on Tue, 1 Oct 2024 12:52:48 +0200:
with this patch applied it still fails[1] to build on i386 (Debian) for me, with
73 | if (iconv(inv_msgiconv, (const char **)&filename, &filename_len, | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | const char **
Which patch? It's okay in current svn.
Apologies, I was not subscribed so I just copied the subject without a proper quote; the patch posted in https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-September/074217.h... Current svn still fails on i386, see https://trac.mplayerhq.hu/ticket/2424 Lorenzo
Ingo _______________________________________________ MPlayer-dev-eng mailing list MPlayer-dev-eng@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
Lorenzo wrote on Tue, 1 Oct 2024 14:25:54 +0200:
On Tue, 01 Oct 2024 14:13:36 +0200 Ingo Brückl <ib@oddnet.de> wrote:
Lorenzo wrote on Tue, 1 Oct 2024 12:52:48 +0200:
with this patch applied it still fails[1] to build on i386 (Debian) for me, with
73 | if (iconv(inv_msgiconv, (const char **)&filename, &filename_len, | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | const char **
Which patch? It's okay in current svn.
Apologies, I was not subscribed so I just copied the subject without a proper quote; the patch posted in https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-September/074217.h...
This patch is broken regarding all (const char **) casts for iconv() which takes char ** as a second argument. Ingo
Hi/2. Ingo Brückl wrote:
Lorenzo wrote on Tue, 1 Oct 2024 14:25:54 +0200:
On Tue, 01 Oct 2024 14:13:36 +0200 Ingo Brückl <ib@oddnet.de> wrote:
Lorenzo wrote on Tue, 1 Oct 2024 12:52:48 +0200:
with this patch applied it still fails[1] to build on i386 (Debian) for me, with
73 | if (iconv(inv_msgiconv, (const char **)&filename, &filename_len, | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | const char **
Which patch? It's okay in current svn.
Apologies, I was not subscribed so I just copied the subject without a proper quote; the patch posted in https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-September/074217.h...
This patch is broken regarding all (const char **) casts for iconv() which takes char ** as a second argument.
Hmm... OS/2 iconv() has `const' qualifier. Anyway I've attached the fixed patch. -- KO Myung-Hun Korean OS/2 User Community : https://www.os2.kr/
Hi komh, hi Ingo, hi all! On 2024-10-02 21:09 +0900, KO Myung-Hun wrote:
Ingo Brückl wrote:
Lorenzo wrote on Tue, 1 Oct 2024 14:25:54 +0200:
On Tue, 01 Oct 2024 14:13:36 +0200 Ingo Brückl <ib@oddnet.de> wrote:
Lorenzo wrote on Tue, 1 Oct 2024 12:52:48 +0200:
with this patch applied it still fails[1] to build on i386 (Debian) for me, with
73 | if (iconv(inv_msgiconv, (const char **)&filename, &filename_len, | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | const char **
Which patch? It's okay in current svn.
Apologies, I was not subscribed so I just copied the subject without a proper quote; the patch posted in https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-September/074217.h...
This patch is broken regarding all (const char **) casts for iconv() which takes char ** as a second argument.
Hmm... OS/2 iconv() has `const' qualifier.
Anyway I've attached the fixed patch.
Most of the patch looks OK, besides the iconv stuff, that I need to look into more... @komh: Did you try to only fix warnings that became errors recently? Or did you aim for also reducing some more warnings? Alexander
Hi/2. Alexander Strasser wrote:
Hi komh, hi Ingo, hi all!
On 2024-10-02 21:09 +0900, KO Myung-Hun wrote:
Ingo Brückl wrote:
Lorenzo wrote on Tue, 1 Oct 2024 14:25:54 +0200:
On Tue, 01 Oct 2024 14:13:36 +0200 Ingo Brückl <ib@oddnet.de> wrote:
Lorenzo wrote on Tue, 1 Oct 2024 12:52:48 +0200:
with this patch applied it still fails[1] to build on i386 (Debian) for me, with
73 | if (iconv(inv_msgiconv, (const char **)&filename, &filename_len, | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | const char **
Which patch? It's okay in current svn.
Apologies, I was not subscribed so I just copied the subject without a proper quote; the patch posted in https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-September/074217.h...
This patch is broken regarding all (const char **) casts for iconv() which takes char ** as a second argument.
Hmm... OS/2 iconv() has `const' qualifier.
Anyway I've attached the fixed patch.
Most of the patch looks OK, besides the iconv stuff, that I need to look into more...
Applied except iconv() parts. Thanks.
@komh: Did you try to only fix warnings that became errors recently?
Yes.
Or did you aim for also reducing some more warnings?
Nope. -- KO Myung-Hun Korean OS/2 User Community : https://www.os2.kr/
On 2025-01-08 23:24 +0900, KO Myung-Hun wrote:
Alexander Strasser wrote:
On 2024-10-02 21:09 +0900, KO Myung-Hun wrote:
Ingo Brückl wrote:
Lorenzo wrote on Tue, 1 Oct 2024 14:25:54 +0200:
On Tue, 01 Oct 2024 14:13:36 +0200 Ingo Brückl <ib@oddnet.de> wrote:
Lorenzo wrote on Tue, 1 Oct 2024 12:52:48 +0200:
> with this patch applied it still fails[1] to build on i386 (Debian) > for me, with
> 73 | if (iconv(inv_msgiconv, (const char **)&filename, &filename_len, > | ^~~~~~~~~~~~~~~~~~~~~~~~ > | | > | const char **
Which patch? It's okay in current svn.
Apologies, I was not subscribed so I just copied the subject without a proper quote; the patch posted in https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-September/074217.h...
This patch is broken regarding all (const char **) casts for iconv() which takes char ** as a second argument.
Hmm... OS/2 iconv() has `const' qualifier.
Anyway I've attached the fixed patch.
Most of the patch looks OK, besides the iconv stuff, that I need to look into more...
Applied except iconv() parts.
Thanks.
Great, thank you! [...] Best regards, Alexander
Hi!
On 2 Oct 2024, at 14:09, KO Myung-Hun <komh78@gmail.com> wrote:
Hi/2.
Ingo Brückl wrote:
Lorenzo wrote on Tue, 1 Oct 2024 14:25:54 +0200:
On Tue, 01 Oct 2024 14:13:36 +0200 Ingo Brückl <ib@oddnet.de> wrote:
Lorenzo wrote on Tue, 1 Oct 2024 12:52:48 +0200:
with this patch applied it still fails[1] to build on i386 (Debian) for me, with
73 | if (iconv(inv_msgiconv, (const char **)&filename, &filename_len, | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | const char **
Which patch? It's okay in current svn.
Apologies, I was not subscribed so I just copied the subject without a proper quote; the patch posted in https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-September/074217.h...
This patch is broken regarding all (const char **) casts for iconv() which takes char ** as a second argument.
Hmm... OS/2 iconv() has `const' qualifier.
POSIX is quite clear that that's wrong. If at all possible it would be much preferable to make OS/2 behave as POSIX says. If not an option, I think it would be better to have something that separates out OS/2 behaviour as it is wrong. Maybe wrapping iconv or a define. Or a #define for the proper type to cast the iconv input buffer to with a comment that/why it's different on OS/2
On 27 Dec 2024, at 19:37, Reimar Döffinger <Reimar.Doeffinger@gmx.de> wrote:
Hi!
On 2 Oct 2024, at 14:09, KO Myung-Hun <komh78@gmail.com> wrote:
Hi/2.
Ingo Brückl wrote:
Lorenzo wrote on Tue, 1 Oct 2024 14:25:54 +0200:
On Tue, 01 Oct 2024 14:13:36 +0200 Ingo Brückl <ib@oddnet.de> wrote:
Lorenzo wrote on Tue, 1 Oct 2024 12:52:48 +0200:
with this patch applied it still fails[1] to build on i386 (Debian) for me, with
73 | if (iconv(inv_msgiconv, (const char **)&filename, &filename_len, | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | const char **
Which patch? It's okay in current svn.
Apologies, I was not subscribed so I just copied the subject without a proper quote; the patch posted in https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-September/074217.h...
This patch is broken regarding all (const char **) casts for iconv() which takes char ** as a second argument.
Hmm... OS/2 iconv() has `const' qualifier.
POSIX is quite clear that that's wrong. If at all possible it would be much preferable to make OS/2 behave as POSIX says. If not an option, I think it would be better to have something that separates out OS/2 behaviour as it is wrong. Maybe wrapping iconv or a define. Or a #define for the proper type to cast the iconv input buffer to with a comment that/why it's different on OS/2
I forgot a 3rd option: maybe even just disabling the warning for OS/2...
Hi/2. Reimar Döffinger wrote:
On 27 Dec 2024, at 19:37, Reimar Döffinger <Reimar.Doeffinger@gmx.de> wrote:
Hi!
On 2 Oct 2024, at 14:09, KO Myung-Hun <komh78@gmail.com> wrote:
Hi/2.
Ingo Brückl wrote:
Lorenzo wrote on Tue, 1 Oct 2024 14:25:54 +0200:
On Tue, 01 Oct 2024 14:13:36 +0200 Ingo Brückl <ib@oddnet.de> wrote:
Lorenzo wrote on Tue, 1 Oct 2024 12:52:48 +0200:
> with this patch applied it still fails[1] to build on i386 (Debian) > for me, with
> 73 | if (iconv(inv_msgiconv, (const char **)&filename, &filename_len, > | ^~~~~~~~~~~~~~~~~~~~~~~~ > | | > | const char **
Which patch? It's okay in current svn.
Apologies, I was not subscribed so I just copied the subject without a proper quote; the patch posted in https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-September/074217.h...
This patch is broken regarding all (const char **) casts for iconv() which takes char ** as a second argument.
Hmm... OS/2 iconv() has `const' qualifier.
POSIX is quite clear that that's wrong. If at all possible it would be much preferable to make OS/2 behave as POSIX says.
I agree, and I already requested this to the maintainer of OS/2 libc.
If not an option, I think it would be better to have something that separates out OS/2 behaviour as it is wrong. Maybe wrapping iconv or a define. Or a #define for the proper type to cast the iconv input buffer to with a comment that/why it's different on OS/2
I forgot a 3rd option: maybe even just disabling the warning for OS/2...
I'll think about this problem more. Thanks. -- KO Myung-Hun Korean OS/2 User Community : https://www.os2.kr/
participants (5)
-
Alexander Strasser -
Ingo Brückl -
KO Myung-Hun -
Lorenzo -
Reimar Döffinger