Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 889410 - media-video/mplayer-1.5: does not compile with clang 15 (-Wint-conversion)
Summary: media-video/mplayer-1.5: does not compile with clang 15 (-Wint-conversion)
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2023-01-02 19:33 UTC by Raimund
Modified: 2023-01-02 22:22 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raimund 2023-01-02 19:33:02 UTC
While when compiling with gcc only warnings are shown...

<code>
 libmpcodecs/ve_lavc.c: In function 'config':
libmpcodecs/ve_lavc.c:444:39: warning: assignment to 'RcOverride *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  444 |         lavc_venc_context->rc_override=
      |                                       ^
</code>

LLVM decided that this code is not acceptable:

<code>
libmpcodecs/ve_lavc.c:444:39: error: incompatible integer to pointer conversion assigning to 'RcOverride *' (aka 'struct RcOverride *') from 'int' [-Wint-conversion]
clang -MMD -MP -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O2 -pipe -march=native -fno-asynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -fpie -DPIC -D_REENTRANT -I/usr/include/dvdcss -I/usr/include/freetype2 -DZLIB_CONST -I/usr/include/dvdcss -c -o codec-cfg.o codec-cfg.c
        lavc_venc_context->rc_override=
</code>



Reproducible: Always

Steps to Reproduce:
1. Try to compile with clang/LLVM 15.0.6
2.
3.
Actual Results:  
compilation fails

Expected Results:  
compilation should succeed
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-02 19:47:36 UTC
Please always include the full build.log and emerge --info.
Comment 2 Raimund 2023-01-02 22:22:10 UTC
It's possible to emulate gcc's behaviour with "-Wno-error=int-conversion", but that's only a workaround, not a solution.