[MPlayer-users] Current build from the repo... fails...

Alexander Strasser eclipse7 at gmx.net
Sun Apr 28 21:48:18 EEST 2024


Hi George!

On 2024-04-25 17:30 +0000, George R Goffe wrote:
> Howdy,
>
> I'm having trouble building mplayer on my Fedora 41 system with gcc "gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)". 

In GCC 14 many previous warning will become errors instead. Especially
`-Wincompatible-pointer-types` is a problem in many places in MPlayer.


> Could I get some help with this please?

There is a patch on the development mailing list that might be enough to
make the build work again or not:

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


In any way it will never be applied as it makes sense to deal with this
issues in a more one by one fashion. I sent it just to raise awareness
so we can tackle this issues.


Best regards,
  Alexander


> Here's what I'm getting:
>
> cc -MMD -MP -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Werror=format-security
> -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statemen
> t -std=c11 -Werror-implicit-function-declaration -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -
> I. -Iffcfg-common.h:464:14: warning: initialization discards 'const' qualifier from pointer target type [-Wdisca
> rded-qualifiers]
>  464 |     {"vivo", vivoopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
>      |              ^~~~~~~~~~~~~
> cfg-common.h:466:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  466 |     {"dvbin", dvbin_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
>      |               ^~~~~~~~~~~~~~~
> cfg-common.h:506:16: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  506 |     {"af-adv", audio_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
>      |                ^~~~~~~~~~~~~~~~~
> cfg-common.h:509:65: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  509 |     {"vf*", &vf_settings, CONF_TYPE_OBJ_SETTINGS_LIST, 0, 0, 0, &vf_obj_list},
>      |                                                                 ^
> cfg-common.h:519:16: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  519 |     {"pphelp", pp_help, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
>      |                ^~~~~~~
> cfg-common.h:525:13: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  525 |     {"ssf", scaler_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
>      |             ^~~~~~~~~~~~~~~~~~
> cfg-common.h:547:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  547 |     {"lavdopts", lavc_decode_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
>      |                  ^~~~~~~~~~~~~~~~~~~~~
> cfg-common.h:548:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  548 |     {"lavfdopts",  lavfdopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
>      |                    ^~~~~~~~~~~~~~
> cfg-mplayer.h:354:16: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-q
> ualifiers]
>  354 |     {"tvscan", tvscan_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
>      |                ^~~~~~~~~~~
> cfg-mplayer.h:361:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-q
> ualifiers]
>  361 |     {"-hifiers]
>  460 |     {"pvr", pvropts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
>      |             ^~~~~~~~~~~~
> cfg-common.h:464:14: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  464 |     {"vivo", vivoopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
>      |              ^~~~~~~~~~~~~
> cfg-common.h:466:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  466 |     {"dvbin", dvbin_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
>      |               ^~~~~~~~~~~~~~~
> cfg-common.h:506:16: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  506 |     {"af-adv", audio_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
>      |                ^~~~~~~~~~~~~~~~~
> cfg-common.h:509:65: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  509 |     {"vf*", &vf_settings, CONF_TYPE_OBJ_SETTINGS_LIST, 0, 0, 0, &vf_obj_list},
>      |                                                                 ^
> cfg-common.h:519:16: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  519 |     {"pphelp", pp_help, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
>      |                ^~~~~~~
> cfg-common.h:525:13: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  525 |     {"ssf", scaler_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
>      |             ^~~~~~~~~~~~~~~~~~
> cfg-common.h:547:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qu
> alifiers]
>  547 |     {"mplayer.c: In function 'main':
> mplayer.c:3539:41: error: passing argument 2 of 'stream_write_buffer' from incompatible pointer type [-Wincompat
> ible-pointer-types]
> 3539 |                 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:730: mplayer.o] Error 1
>


More information about the MPlayer-users mailing list