Skip to content

Build failures on gcc-13: option_collation.cpp:1298: error: redundant move in initialization #276

@trofi

Description

@trofi

Describe the bug

octopus fails to build on gcc-13 due to -Werror=redundant-move warning treated as errors.

After an upgrade to gcc-13 nixpkgs package repository found build failures against x86_64-linux gcc: https://hydra.nixos.org/build/247552194

Current master reports at least these ones:

octopus> [ 10%] Building CXX object src/CMakeFiles/octopus.dir/config/option_collation.cpp.o
octopus> /build/source/src/config/option_collation.cpp: In function 'auto octopus::options::make_variant_generator_builder(const OptionMap&, boost::optional<const octopus::ReadSetProfile&>)':
octopus> /build/source/src/config/option_collation.cpp:1355: error: redundant move in initialization [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wredundant-move-Werror=redundant-move8;;]
octopus>  1355 |                 throw ConflictingSourceVariantFile {std::move(source_path), *output_path};
octopus>       |
octopus> /build/source/src/config/option_collation.cpp:1355: note: remove 'std::move' call
octopus> /build/source/src/config/option_collation.cpp:1368: error: redundant move in initialization [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wredundant-move-Werror=redundant-move8;;]
octopus>  1368 |             result.add_vcf_extractor(std::move(source_path), vcf_options);
octopus>       |
octopus> /build/source/src/config/option_collation.cpp:1368: note: remove 'std::move' call
octopus> cc1plus: all warnings being treated as errors
octopus> make[2]: *** [src/CMakeFiles/octopus.dir/build.make:132: src/CMakeFiles/octopus.dir/config/option_collation.cpp.o] Error 1
octopus> make[1]: *** [CMakeFiles/Makefile2:291: src/CMakeFiles/octopus.dir/all] Error 2
octopus> make: *** [Makefile:136: all] Error 2

Version

master branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions