Kernel: Fix miscellaneous warnings when building with Clang
These small changes fix the remaining warnings that come up during kernel compilation with Clang. These specific fixes were for benign things: unused lambda captures and braces around scalar initializers.
This commit is contained in:
parent
3c6bdb8a61
commit
42d197cde7
Notes:
sideshowbarker
2024-07-18 11:05:22 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/42d197cde74 Pull-request: https://github.com/SerenityOS/serenity/pull/8354 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/alimpfard
4 changed files with 4 additions and 5 deletions
|
@ -69,7 +69,7 @@ void PS2KeyboardDevice::irq_handle_byte_read(u8 byte)
|
|||
break;
|
||||
default:
|
||||
if ((m_modifiers & Mod_Alt) != 0 && ch >= 2 && ch <= ConsoleManagement::s_max_virtual_consoles + 1) {
|
||||
g_io_work->queue([this, ch]() {
|
||||
g_io_work->queue([ch]() {
|
||||
ConsoleManagement::the().switch_to(ch - 0x02);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -237,7 +237,7 @@ KResultOr<size_t> FileDescription::get_dir_entries(UserOrKernelBuffer& output_bu
|
|||
return true;
|
||||
};
|
||||
|
||||
KResult result = VFS::the().traverse_directory_inode(*m_inode, [&flush_stream_to_output_buffer, &error, &remaining, &output_buffer, &stream, this](auto& entry) {
|
||||
KResult result = VFS::the().traverse_directory_inode(*m_inode, [&flush_stream_to_output_buffer, &stream, this](auto& entry) {
|
||||
size_t serialized_size = sizeof(ino_t) + sizeof(u8) + sizeof(size_t) + sizeof(char) * entry.name.length();
|
||||
if (serialized_size > stream.remaining()) {
|
||||
if (!flush_stream_to_output_buffer()) {
|
||||
|
|
|
@ -26,7 +26,7 @@ static constexpr IntelNativeGraphicsAdapter::PLLMaxSettings G35Limits {
|
|||
};
|
||||
|
||||
static constexpr u16 supported_models[] {
|
||||
{ 0x29c2 }, // Intel G35 Adapter
|
||||
0x29c2, // Intel G35 Adapter
|
||||
};
|
||||
|
||||
static bool is_supported_model(u16 device_id)
|
||||
|
|
|
@ -48,7 +48,6 @@ KResultOr<size_t> TTY::read(FileDescription&, u64, UserOrKernelBuffer& buffer, s
|
|||
[[maybe_unused]] auto rc = Process::current()->send_signal(SIGTTIN, nullptr);
|
||||
return EINTR;
|
||||
}
|
||||
|
||||
if (m_input_buffer.size() < static_cast<size_t>(size))
|
||||
size = m_input_buffer.size();
|
||||
|
||||
|
@ -93,7 +92,7 @@ KResultOr<size_t> TTY::write(FileDescription&, u64, const UserOrKernelBuffer& bu
|
|||
u8 modified_data[num_chars * 2];
|
||||
size_t modified_data_size = 0;
|
||||
for (size_t i = 0; i < buffer_bytes; ++i) {
|
||||
process_output(data[i], [this, &modified_data, &modified_data_size](u8 out_ch) {
|
||||
process_output(data[i], [&modified_data, &modified_data_size](u8 out_ch) {
|
||||
modified_data[modified_data_size++] = out_ch;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue