Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 944213 - =media-video/xine-ui-0.99.13-r1 fails with c23/gcc-15.0.0_pre20241117: file_browser.c:570:12: error: assignment to ‘int (*)(void)’ from incompatible pointer type ‘int (*)(const fileinfo_t *, const fileinfo_t *)’
Summary: =media-video/xine-ui-0.99.13-r1 fails with c23/gcc-15.0.0_pre20241117: file_b...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c23-porting
  Show dependency tree
 
Reported: 2024-11-21 01:12 UTC by tdr
Modified: 2024-11-24 23:15 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (tdr-emerge--info.txt,6.30 KB, text/plain)
2024-11-21 01:12 UTC, tdr
Details
build failure log (xine-ui-0.99.13-r1.build.log,87.66 KB, text/plain)
2024-11-21 01:13 UTC, tdr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tdr 2024-11-21 01:12:51 UTC
Created attachment 910907 [details]
emerge --info

c23 is more strict than previous standards
incompatible types detected



file_browser.c: In function ‘sort_files’:
file_browser.c:570:12: error: assignment to ‘int (*)(void)’ from incompatible pointer type ‘int (*)(const fileinfo_t *, const fileinfo_t *)’ [-Wincompatible-pointer-types]
  570 |       func = _sortfiles_reverse;
      |            ^
file_browser.c:572:12: error: assignment to ‘int (*)(void)’ from incompatible pointer type ‘int (*)(const fileinfo_t *, const fileinfo_t *)’ [-Wincompatible-pointer-types]
  572 |       func = _sortfiles_default;
      |            ^
file_browser.c:574:62: error: passing argument 4 of ‘qsort’ from incompatible pointer type [-Wincompatible-pointer-types]
  574 |     qsort(fb->norm_files, fb->files_num, sizeof(fileinfo_t), func);
      |                                                              ^~~~
      |                                                              |
      |                                                              int (*)(void)
In file included from /usr/include/xine/xineutils.h:27,
                 from common.h:32,
                 from file_browser.c:35:
/usr/include/stdlib.h:971:34: note: expected ‘__compar_fn_t’ {aka ‘int (*)(const void *, const void *)’} but argument is of type ‘int (*)(void)’
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
file_browser.c: In function ‘sort_directories’:
file_browser.c:603:12: error: assignment to ‘int (*)(void)’ from incompatible pointer type ‘int (*)(const fileinfo_t *, const fileinfo_t *)’ [-Wincompatible-pointer-types]
  603 |       func = _sortfiles_reverse;
      |            ^
file_browser.c:605:12: error: assignment to ‘int (*)(void)’ from incompatible pointer type ‘int (*)(const fileinfo_t *, const fileinfo_t *)’ [-Wincompatible-pointer-types]
  605 |       func = _sortfiles_default;
      |            ^
file_browser.c:607:67: error: passing argument 4 of ‘qsort’ from incompatible pointer type [-Wincompatible-pointer-types]
  607 |     qsort(fb->dir_files, fb->directories_num, sizeof(fileinfo_t), func);
      |                                                                   ^~~~
      |                                                                   |
      |                                                                   int (*)(void)


builds successfully with CFLAGS="${CFLAGS} -std=gnu17"
Comment 1 tdr 2024-11-21 01:13:19 UTC
Created attachment 910908 [details]
build failure log
Comment 2 Larry the Git Cow gentoo-dev 2024-11-24 23:15:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6da4e1cd14721a2d60f53374b7636806831c402

commit f6da4e1cd14721a2d60f53374b7636806831c402
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-11-24 23:12:01 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-11-24 23:15:16 +0000

    media-video/xine-ui: add 0.99.14
    
    Old codebase so -std=gnu17.
    
    Closes: https://bugs.gentoo.org/944213
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/xine-ui/Manifest                       |  1 +
 .../files/xine-ui-0.99.14-configure-c99.patch      | 75 ++++++++++++++++++
 media-video/xine-ui/xine-ui-0.99.14.ebuild         | 92 ++++++++++++++++++++++
 3 files changed, 168 insertions(+)