From 9dd04ad268b992fd3fb22db52ab8272e29b27d5c Mon Sep 17 00:00:00 2001 From: Piotr Tworek Date: Thu, 3 Dec 2020 00:14:00 +0100 Subject: [PATCH] os: Drop unused lambda captures in VFS code. Clang likes to complain when lambdas capture parameters without actually using them. This patch fixes a couple of such problems in VFS related os module code. Issue #4421 --- repos/os/include/vfs/dir_file_system.h | 2 +- repos/os/include/vfs/readonly_value_file_system.h | 2 +- repos/os/src/lib/vfs/rom_file_system.h | 2 +- repos/os/src/lib/vfs/rtc_file_system.h | 2 +- repos/os/src/lib/vfs/terminal_file_system.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/repos/os/include/vfs/dir_file_system.h b/repos/os/include/vfs/dir_file_system.h index c2e7160277..81efc65212 100644 --- a/repos/os/include/vfs/dir_file_system.h +++ b/repos/os/include/vfs/dir_file_system.h @@ -1011,7 +1011,7 @@ class Vfs::Dir_file_system : public File_system Dir_vfs_handle *dir_vfs_handle = static_cast(vfs_handle); - auto f = [&result, dir_vfs_handle] (Dir_vfs_handle::Subdir_handle_element &e) { + auto f = [&result] (Dir_vfs_handle::Subdir_handle_element &e) { if (e.synced) return; diff --git a/repos/os/include/vfs/readonly_value_file_system.h b/repos/os/include/vfs/readonly_value_file_system.h index 5772c6aa31..6c15b0bb55 100644 --- a/repos/os/include/vfs/readonly_value_file_system.h +++ b/repos/os/include/vfs/readonly_value_file_system.h @@ -108,7 +108,7 @@ class Vfs::Readonly_value_file_system : public Vfs::Single_file_system { _buffer = Buffer(value); - _handle_registry.for_each([this] (Registered_watch_handle &handle) { + _handle_registry.for_each([] (Registered_watch_handle &handle) { handle.watch_response(); }); } diff --git a/repos/os/src/lib/vfs/rom_file_system.h b/repos/os/src/lib/vfs/rom_file_system.h index 1052f5d18b..42d98ad050 100644 --- a/repos/os/src/lib/vfs/rom_file_system.h +++ b/repos/os/src/lib/vfs/rom_file_system.h @@ -122,7 +122,7 @@ class Vfs::Rom_file_system : public Single_file_system void _handle_rom_changed() { - _handle_registry.for_each([this] (Registered_watch_handle &handle) { + _handle_registry.for_each([] (Registered_watch_handle &handle) { handle.watch_response(); }); } diff --git a/repos/os/src/lib/vfs/rtc_file_system.h b/repos/os/src/lib/vfs/rtc_file_system.h index a6fa3373f6..3d2449edbc 100644 --- a/repos/os/src/lib/vfs/rtc_file_system.h +++ b/repos/os/src/lib/vfs/rtc_file_system.h @@ -95,7 +95,7 @@ class Vfs::Rtc_file_system : public Single_file_system void _handle_set_signal() { - _handle_registry.for_each([this] (Registered_watch_handle &handle) { + _handle_registry.for_each([] (Registered_watch_handle &handle) { handle.watch_response(); }); } diff --git a/repos/os/src/lib/vfs/terminal_file_system.h b/repos/os/src/lib/vfs/terminal_file_system.h index f2b78cb620..b7797e4d03 100644 --- a/repos/os/src/lib/vfs/terminal_file_system.h +++ b/repos/os/src/lib/vfs/terminal_file_system.h @@ -192,7 +192,7 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system _fetch_data_from_terminal(_terminal, _read_buffer, _interrupt_handler, _raw); - _handle_registry.for_each([this] (Registered_handle &handle) { + _handle_registry.for_each([] (Registered_handle &handle) { if (handle.blocked) { handle.blocked = false; handle.io_progress_response();