On 07/02/19 11:26 +0100, J. Scheurich wrote:
the compilation of mellowplayer-3.5.1 with gcc-9.0.1 fails on Fedora 30,
see the build.log [1]
Fedora Bugzilla [2] - -Wredundant-move gives false positives in C++11 mode
This is not a false positive. Just because GCC *sometimes* gives false
positives for this warning, doesn't mean your case is a false
positive.
Your package SHOULD NOT use -Werror, so if you don't know enough C++
to change the package source code then you should fix the spec file to
remove -Werror from the build flags.
[1] https://kojipkgs.fedoraproject.org//work/tasks/2212/32602212/build.log
BUILDSTDERR: /builddir/build/BUILD/MellowPlayer-402e336880f94853a541fc3e773e593b584fe8e0/src/3rdparty/boost-di-extensions/Factory.hpp:31:24: required from here
BUILDSTDERR: /builddir/build/BUILD/MellowPlayer-402e336880f94853a541fc3e773e593b584fe8e0/src/3rdparty/boost-di-extensions/Factory.hpp:45:32: error: redundant move in return statement [-Werror=redundant-move]
BUILDSTDERR: /builddir/build/BUILD/MellowPlayer-402e336880f94853a541fc3e773e593b584fe8e0/src/3rdparty/boost-di-extensions/Factory.hpp:45:32: note: remove 'std::move' call
BUILDSTDERR: cc1plus: error: unrecognized command line option '-Wno-c++1z-extensions' [-Werror]
BUILDSTDERR: cc1plus: error: unrecognized command line option '-Wno-unused-private-field' [-Werror]
BUILDSTDERR: cc1plus: all warnings being treated as errors
BUILDSTDERR: make[2]: *** [src/main/CMakeFiles/MellowPlayer.dir/build.make:150: src/main/CMakeFiles/MellowPlayer.dir/Program.cpp.o] Error 1
BUILDSTDERR: make[1]: *** [CMakeFiles/Makefile2:515: src/main/CMakeFiles/MellowPlayer.dir/all] Error 2
BUILDSTDERR: make: *** [Makefile:133: all] Error 2
RPM build errors:
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.CD4l4Z (%build)
BUILDSTDERR: Bad exit status from /var/tmp/rpm-tmp.CD4l4Z (%build)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
it looks lie the options -Wno-c++1z-extensions and
-Wno-unused-private-field' are wrong
Those are Clang warnings. Using -Wno-blahblah is ignored by GCC if it
doesn't have a -Wblahblah option, *unless* other errors occur, then it
will complain.
So if the code compiles, unknown -Wno-blahblah options are ignored. So
if the -Wredundant-move warning was fixed, GCC would ignore the
-Wno-c++1z-extensions and -Wno-unused-private-field options.
...
UILDSTDERR: /builddir/build/BUILD/MellowPlayer-402e336880f94853a541fc3e773e593b584fe8e0/src/3rdparty/boost-di-extensions/Factory.hpp:31:24: required from here
BUILDSTDERR: /builddir/build/BUILD/MellowPlayer-402e336880f94853a541fc3e773e593b584fe8e0/src/3rdparty/boost-di-extensions/Factory.hpp:45:32: error: redundant move in return statement [-Werror=redundant-move]
BUILDSTDERR: 45 | return std::move(object);
BUILDSTDERR: | ^
https://stackoverflow.com/questions/9532608/is-returning-with-stdmove-sensible-in-the-case-of-multiple-return-statements
For local variables, there's no need to |std::move| them in the |return|
statement most of the time^† , since the language actually demands that
this happens automatically:
||
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx