diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index 41ed8fafdc..eb02fb5955 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -295,7 +295,7 @@ void BrowserWindow::build_menus() }; m_disable_search_engine_action = GUI::Action::create_checkable( - "Disable", [this](auto&) { + "Disable", [](auto&) { g_search_engine = {}; auto config = Core::ConfigFile::get_for_app("Browser"); config->write_entry("Preferences", "SearchEngine", g_search_engine); diff --git a/Userland/Applications/CrashReporter/main.cpp b/Userland/Applications/CrashReporter/main.cpp index 311bc56966..d2acee7cd1 100644 --- a/Userland/Applications/CrashReporter/main.cpp +++ b/Userland/Applications/CrashReporter/main.cpp @@ -52,8 +52,6 @@ static TitleAndText build_backtrace(const CoreDump::Reader& coredump, const ELF: builder.append('\n'); }; - auto& backtrace_entries = backtrace.entries(); - if (metadata.contains("assertion")) prepend_metadata("assertion", "ASSERTION FAILED: {}"); else if (metadata.contains("pledge_violation")) diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp index 7fb83efd5e..a8c5dbf909 100644 --- a/Userland/Applications/SystemMonitor/main.cpp +++ b/Userland/Applications/SystemMonitor/main.cpp @@ -699,19 +699,19 @@ NonnullRefPtr build_graphs_tab() memory_graph.set_stack_values(true); memory_graph.set_value_format(0, { .graph_color_role = ColorRole::SyntaxComment, - .text_formatter = [&memory_graph](int value) { + .text_formatter = [](int value) { return String::formatted("Committed: {} KiB", value); }, }); memory_graph.set_value_format(1, { .graph_color_role = ColorRole::SyntaxPreprocessorStatement, - .text_formatter = [&memory_graph](int value) { + .text_formatter = [](int value) { return String::formatted("Allocated: {} KiB", value); }, }); memory_graph.set_value_format(2, { .graph_color_role = ColorRole::SyntaxPreprocessorValue, - .text_formatter = [&memory_graph](int value) { + .text_formatter = [](int value) { return String::formatted("Kernel heap: {} KiB", value); }, }); diff --git a/Userland/DevTools/HackStudio/Editor.cpp b/Userland/DevTools/HackStudio/Editor.cpp index 8b953fb07c..dde57b5624 100644 --- a/Userland/DevTools/HackStudio/Editor.cpp +++ b/Userland/DevTools/HackStudio/Editor.cpp @@ -577,7 +577,7 @@ void Editor::on_identifier_click(const GUI::TextDocumentSpan& span) if (!m_language_client) return; - m_language_client->on_declaration_found = [this](const String& file, size_t line, size_t column) { + m_language_client->on_declaration_found = [](const String& file, size_t line, size_t column) { HackStudio::open_file(file, line, column); }; m_language_client->search_declaration(code_document().file_path(), span.range.start().line(), span.range.start().column()); diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index e912866a79..060fe1db22 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -504,7 +504,7 @@ NonnullRefPtr HackStudioWidget::create_switch_to_next_editor_action if (m_all_editor_wrappers.size() <= 1) return; Vector wrappers; - m_editors_splitter->for_each_child_of_type([this, &wrappers](auto& child) { + m_editors_splitter->for_each_child_of_type([&wrappers](auto& child) { wrappers.append(child); return IterationDecision::Continue; }); @@ -525,7 +525,7 @@ NonnullRefPtr HackStudioWidget::create_switch_to_previous_editor_ac if (m_all_editor_wrappers.size() <= 1) return; Vector wrappers; - m_editors_splitter->for_each_child_of_type([this, &wrappers](auto& child) { + m_editors_splitter->for_each_child_of_type([&wrappers](auto& child) { wrappers.append(child); return IterationDecision::Continue; }); diff --git a/Userland/Libraries/LibDebug/DebugSession.cpp b/Userland/Libraries/LibDebug/DebugSession.cpp index 766aad2fff..f7ab3a67a8 100644 --- a/Userland/Libraries/LibDebug/DebugSession.cpp +++ b/Userland/Libraries/LibDebug/DebugSession.cpp @@ -486,7 +486,7 @@ Optional DebugSession::symbolicate(FlatPtr ad Optional DebugSession::get_address_from_source_position(String const& file, size_t line) const { Optional result; - for_each_loaded_library([this, file, line, &result](auto& lib) { + for_each_loaded_library([file, line, &result](auto& lib) { // The loader contains its own definitions for LibC symbols, so we don't want to include it in the search. if (lib.name == "Loader.so") return IterationDecision::Continue; diff --git a/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp b/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp index 8a15c7c0bf..e912740bd7 100644 --- a/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp +++ b/Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp @@ -241,7 +241,7 @@ void DwarfInfo::build_cached_dies() const m_cached_dies_by_range.insert(range.start_address, DIEAndRange { die, range }); m_cached_dies_by_offset.insert(die.offset(), die); }; - auto get_ranges_of_die = [this](DIE const& die) -> Vector { + auto get_ranges_of_die = [](DIE const& die) -> Vector { // TODO support DW_AT_ranges (appears when range is non-contiguous) auto start = die.get_attribute(Attribute::LowPc); diff --git a/Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp b/Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp index 10d37206a9..a11bd105e7 100644 --- a/Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp +++ b/Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp @@ -161,8 +161,6 @@ void on_max_age_attribute(ParsedCookie& parsed_cookie, StringView attribute_valu // Let delta-seconds be the attribute-value converted to an integer. if (auto delta_seconds = attribute_value.to_int(); delta_seconds.has_value()) { - Core::DateTime expiry_time; - if (*delta_seconds <= 0) { // If delta-seconds is less than or equal to zero (0), let expiry-time be the earliest representable date and time. parsed_cookie.expiry_time_from_max_age_attribute = Core::DateTime::from_timestamp(0); diff --git a/Userland/Services/WindowServer/ClientConnection.cpp b/Userland/Services/WindowServer/ClientConnection.cpp index 3c8f958722..2e59e97d8f 100644 --- a/Userland/Services/WindowServer/ClientConnection.cpp +++ b/Userland/Services/WindowServer/ClientConnection.cpp @@ -1034,7 +1034,6 @@ Messages::WindowServer::GetScreenBitmapAroundCursorResponse ClientConnection::ge if (auto bitmap = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, rect.size(), 1)) { auto bounding_screen_src_rect = Screen::bounding_rect().intersected(rect); Gfx::Painter painter(*bitmap); - Gfx::IntRect last_cursor_rect; auto& screen_with_cursor = ScreenInput::the().cursor_location_screen(); auto cursor_rect = Compositor::the().current_cursor_rect(); Screen::for_each([&](auto& screen) { diff --git a/Userland/Services/WindowServer/Menu.cpp b/Userland/Services/WindowServer/Menu.cpp index dd55b7418f..fc87fbb3eb 100644 --- a/Userland/Services/WindowServer/Menu.cpp +++ b/Userland/Services/WindowServer/Menu.cpp @@ -498,7 +498,7 @@ void Menu::start_activation_animation(MenuItem& item) }; auto animation = adopt_own(*new AnimationInfo(move(window))); auto& timer = animation->timer; - timer = Core::Timer::create_repeating(50, [this, animation = animation.ptr(), animation_ref = move(animation)] { + timer = Core::Timer::create_repeating(50, [animation = animation.ptr(), animation_ref = move(animation)] { VERIFY(animation->step % 2 == 0); animation->step -= 2; if (animation->step == 0) {