mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:28:11 +00:00
Userland: Silence or resolve new GCC 13 warnings
GCC 13 produces the following true positive warnings: - `-Wredundant-move` when trying to move `result->tooltip()`, which is a const reference in `Assistant/main.cpp` - `-Wuse-after-free` when freeing an environment variable before removing it from `s_malloced_environment_variables` - `-Wdangling-pointer` when storing an AST node's `this` pointer to the interpreter's node stack in LibJS. This is not actually an issue, as it is popped when the scope ends, but GCC has no way of telling this.
This commit is contained in:
parent
2123fdd678
commit
fc003cd248
3 changed files with 6 additions and 2 deletions
|
@ -251,7 +251,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto& match = results_container.add<Assistant::ResultRow>();
|
||||
match.set_icon(result->bitmap());
|
||||
match.set_text(String::from_deprecated_string(result->title()).release_value_but_fixme_should_propagate_errors());
|
||||
match.set_tooltip(move(result->tooltip()));
|
||||
match.set_tooltip(result->tooltip());
|
||||
match.on_click = [&result](auto) {
|
||||
result->activate();
|
||||
GUI::Application::the()->quit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue