Menu

#38 clang prints a lot of warnings: warning: unqualified call to 'std::move'

Next Commit
open
None
5
2024-02-19
2023-06-11
Yuri
No

For example:

In file included from /usr/ports/audio/yoshimi/work/yoshimi-2.3.0/src/Misc/BuildScheduler.cpp:21:
/usr/ports/audio/yoshimi/work/yoshimi-2.3.0/src/Misc/BuildScheduler.h:299:47: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
                    RunnerBackend::reschedule(move(followUpTask));
                                              ^
                                              std::
/usr/ports/audio/yoshimi/work/yoshimi-2.3.0/src/Misc/BuildScheduler.cpp:78:35: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
                waitingTasks.push(move(task));
                                  ^
                                  std::
/usr/ports/audio/yoshimi/work/yoshimi-2.3.0/src/Misc/BuildScheduler.cpp:86:31: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
                    [workOp = move(task)] () -> void
                              ^
                              std::
/usr/ports/audio/yoshimi/work/yoshimi-2.3.0/src/Misc/BuildScheduler.cpp:91:26: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
                schedule(move(delayedTask));
                         ^
                         std::
/usr/ports/audio/yoshimi/work/yoshimi-2.3.0/src/Misc/BuildScheduler.cpp:127:33: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
                Task nextWorkOp(move(waitingTasks.front()));
                                ^
                                std::
/usr/ports/audio/yoshimi/work/yoshimi-2.3.0/src/Misc/BuildScheduler.cpp:145:43: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        TaskRunnerImpl::access().schedule(move(task));
                                          ^
                                          std::
/usr/ports/audio/yoshimi/work/yoshimi-2.3.0/src/Misc/BuildScheduler.cpp:150:45: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        TaskRunnerImpl::access().reschedule(move(task));
                                            ^
                                            std::
7 warnings generated.

but there are a lot more.

Please consider fixing all of them.

Version: 2.3.0
clang-15
FreeBSD 13.2

Related

Bugs: #38

Discussion

  • Will Godfrey

    Will Godfrey - 2023-06-14

    On Sun, 11 Jun 2023 18:46:52 -0000
    "Yuri" yurivict@users.sourceforge.net wrote:


    [bugs:#38] clang prints a lot of warnings: warning: unqualified call to 'std::move'

    Status: open
    Group: Unknown
    Created: Sun Jun 11, 2023 06:46 PM UTC by Yuri
    Last Updated: Sun Jun 11, 2023 06:46 PM UTC
    Owner: nobody

    This is being looked into. Arguably clang is being overly pedantic. You can
    suppress this warning by adding the following to CmakeLists.txt:

    -Wno-unqualified-std-cast-call

    --
    Will J Godfrey {apparently now an 'elderly'}
    https://willgodfrey.bandcamp.com/
    http://yoshimi.github.io
    Say you have a poem and I have a tune.
    Exchange them and we can both have a poem, a tune, and a song.

     

    Related

    Bugs: #38

  • Will Godfrey

    Will Godfrey - 2023-08-08

    This will be added to CMakeLists.txt in the next commit, but will be commented out in release versions (like a number of other options)

     
  • Will Godfrey

    Will Godfrey - 2023-08-08
    • assigned_to: Will Godfrey
    • Group: Unknown --> Next Commit
     
  • Will Godfrey

    Will Godfrey - 2024-02-19

    Still not completely resolved, but we are working on it.

     

Log in to post a comment.