[MPlayer-users] mplayer.c:3541:41: error: passing argument 2 of 'stream_write_buffer' from incompatible pointer type

Alexander Strasser eclipse7 at gmx.net
Sat Jun 1 12:26:08 EEST 2024


Hi Ilja!

On 2024-05-21 14:29 +0300, Ilja Honkonen wrote:
> Hello
> I get this when compiling mplayer-export-2024-05-21 with gcc 14.1.1 on
> Fedora 40:
> ...
> mplayer.c: In function 'main':
> mplayer.c:3541:41: error: passing argument 2 of 'stream_write_buffer' from
> incompatible pointer type [-Wincompatible-pointer-types]
>  3541 |                 stream_write_buffer(os, &in_size, 4);
>       |                                         ^~~~~~~~
>       |                                         |
>       |                                         int *
> In file included from ./mp_core.h:26,
>                  from gui/interface.h:23,
>                  from mplayer.c:73:
> ./stream/stream.h:203:53: note: expected 'unsigned char *' but argument is
> of type 'int *'
>   203 | int stream_write_buffer(stream_t *s, unsigned char *buf, int len);
>       |                                      ~~~~~~~~~~~~~~~^~~
> make: *** [Makefile:729: mplayer.o] Error 1

Compiling with GCC 14 is known to fail for MPlayer.

I have posted a patch[1] on mplayer development mailing list, but
it will not be applied. Just highlights the places where changes
are needed.

Problem with fixing warnings is: Usually the simplest most straight
forward thing to fix the warning, makes the warning permanently
disappear and the code even more wrong than before.

I hope I can resume working on it, but currently I seriously
lack time to push it forward.


1: https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-April/074173.html


Best regards,
  Alexander




More information about the MPlayer-users mailing list