redundant-move warning in completion.hpp from g++-9.2
We have recently added -pedantic -Wextra
to some of the CI testers using GNU, Clang and Intel compilers. This led to some fixes made to examples and tests over the weekend, but also turned up the following warning from several tests:
/scratch/upcnightly/EX-kotten-smp-gcc-pshm/runtime/work/dbg/upcxx-inst-gasnet_seq/include/upcxx/completion.hpp:132:23: warning: redundant move in return statement [-Wredundant-move]
132 | return std::move(b);
| ^
Compiler output (with full instantiated-from context) for all the warning tests is reachable from this CI link.
I have set Version = Development Branch, because that is what CI is testing. I have not made any effort to determine if this is present in our releases.
Comments (3)
-
-
- changed status to resolved
fix issue
#294: redundant-move warning from g++-9.2See this excellent article for explanation:
https://developers.redhat.com/blog/2019/04/12/understanding-when-not-to-stdmove-in-c/
→ <<cset d90618f13068>>
-
Merge pull request #152 into develop
→ <<cset 8358c60a4b2e>>
- Log in to comment
Proposed fix in pull request #152