Skip to content
Commit 12735d34 authored by Enze Li's avatar Enze Li
Browse files

gdb/build: Fix Wpessimizing-move in clang build

When building with clang, I run into an error:

...
tui/tui-disasm.c:138:25: error: moving a temporary object prevents copy
elision [-Werror,-Wpessimizing-move]
      tal.addr_string = std::move (gdb_dis_out.release ());
                        ^
tui/tui-disasm.c:138:25: note: remove std::move call here
      tal.addr_string = std::move (gdb_dis_out.release ());
                        ^~~~~~~~~~~                      ~
...

The error above is caused by the recent commit 5d10a204 ("gdb: add
string_file::release method").

Fix this by removing std::move.

Build on x86_64-linux with clang 13.0.0.
parent 459140ad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment