diff options
author | Linus Groh <mail@linusgroh.de> | 2021-04-25 20:20:00 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-04-25 20:20:00 +0200 |
commit | dbe72fd9627f701210d69c9b01db762b2c950190 (patch) | |
tree | d2baf354b59d38f3ad486a73523fc43e8c3c6c3b | |
parent | 2d6be48c6f2353a5956341e9b947c715f29a6eaf (diff) | |
download | serenity-dbe72fd9627f701210d69c9b01db762b2c950190.zip |
Everywhere: Remove empty line after function body opening curly brace
25 files changed, 0 insertions, 27 deletions
diff --git a/AK/Tests/TestFormat.cpp b/AK/Tests/TestFormat.cpp index 525082b38f..237d1a4354 100644 --- a/AK/Tests/TestFormat.cpp +++ b/AK/Tests/TestFormat.cpp @@ -167,7 +167,6 @@ TEST_CASE(pointers) // This is a bit scary, thus this test. At least this test should fail in this case. TEST_CASE(ensure_that_format_works) { - if (String::formatted("FAIL") != "FAIL") { fprintf(stderr, "FAIL\n"); exit(1); diff --git a/Kernel/Arch/x86/DescriptorTable.h b/Kernel/Arch/x86/DescriptorTable.h index be9d4efe43..6fe76fd411 100644 --- a/Kernel/Arch/x86/DescriptorTable.h +++ b/Kernel/Arch/x86/DescriptorTable.h @@ -103,7 +103,6 @@ enum class IDTEntryType { // clang-format off struct [[gnu::packed]] IDTEntry { - u16 offset_1; // offset bits 0..15 u16 selector; // a code segment selector in GDT or LDT diff --git a/Kernel/Devices/VMWareBackdoor.cpp b/Kernel/Devices/VMWareBackdoor.cpp index 847e399ad1..137747fcde 100644 --- a/Kernel/Devices/VMWareBackdoor.cpp +++ b/Kernel/Devices/VMWareBackdoor.cpp @@ -45,7 +45,6 @@ inline void vmware_out(VMWareCommand& command) inline void vmware_high_bandwidth_send(VMWareCommand& command) { - command.magic = VMWARE_MAGIC; command.port = VMWARE_PORT_HIGHBANDWIDTH; diff --git a/Kernel/Storage/Partition/DiskPartitionMetadata.cpp b/Kernel/Storage/Partition/DiskPartitionMetadata.cpp index 9b74735b5d..d95ea80fed 100644 --- a/Kernel/Storage/Partition/DiskPartitionMetadata.cpp +++ b/Kernel/Storage/Partition/DiskPartitionMetadata.cpp @@ -42,7 +42,6 @@ DiskPartitionMetadata::DiskPartitionMetadata(u64 start_block, u64 end_block, u8 , m_end_block(end_block) , m_type(partition_type) { - VERIFY(m_type.is_valid()); } @@ -51,7 +50,6 @@ DiskPartitionMetadata::DiskPartitionMetadata(u64 start_block, u64 end_block, Arr , m_end_block(end_block) , m_type(partition_type) { - VERIFY(m_type.is_valid()); } diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index cb7f41b4bb..eb2b6a59d1 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -717,7 +717,6 @@ static KResultOr<Vector<String>> find_shebang_interpreter_for_executable(const c KResultOr<RefPtr<FileDescription>> Process::find_elf_interpreter_for_executable(const String& path, const Elf32_Ehdr& main_program_header, int nread, size_t file_size) { - // Not using KResultOr here because we'll want to do the same thing in userspace in the RTLD String interpreter_path; if (!ELF::validate_program_headers(main_program_header, file_size, (const u8*)&main_program_header, nread, &interpreter_path)) { diff --git a/Kernel/UBSanitizer.cpp b/Kernel/UBSanitizer.cpp index 9963f23458..7777612f6a 100644 --- a/Kernel/UBSanitizer.cpp +++ b/Kernel/UBSanitizer.cpp @@ -89,7 +89,6 @@ void __ubsan_handle_sub_overflow(const OverflowData& data, ValueHandle, ValueHan void __ubsan_handle_negate_overflow(const OverflowData&, ValueHandle); void __ubsan_handle_negate_overflow(const OverflowData& data, ValueHandle) { - dbgln("KUBSAN: negation overflow, {} ({}-bit)", data.type.name(), data.type.bit_width()); print_location(data.location); diff --git a/Userland/Applications/SoundPlayer/M3UParser.cpp b/Userland/Applications/SoundPlayer/M3UParser.cpp index 5b45763e63..e7c3e2ffda 100644 --- a/Userland/Applications/SoundPlayer/M3UParser.cpp +++ b/Userland/Applications/SoundPlayer/M3UParser.cpp @@ -18,7 +18,6 @@ M3UParser::M3UParser() NonnullOwnPtr<M3UParser> M3UParser::from_file(const String path) { - auto parser = make<M3UParser>(); VERIFY(!path.is_null() && !path.is_empty() && !path.is_whitespace()); parser->m_use_utf8 = path.ends_with(".m3u8", AK::CaseSensitivity::CaseInsensitive); diff --git a/Userland/Applications/ThemeEditor/main.cpp b/Userland/Applications/ThemeEditor/main.cpp index be2e37154f..f86bc10939 100644 --- a/Userland/Applications/ThemeEditor/main.cpp +++ b/Userland/Applications/ThemeEditor/main.cpp @@ -47,7 +47,6 @@ private: int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd thread rpath accept cpath wpath unix fattr", nullptr) < 0) { perror("pledge"); return 1; diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index 5726a07c3b..49a4651be0 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -376,7 +376,6 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_new_directory_action() NonnullRefPtr<GUI::Action> HackStudioWidget::create_open_selected_action() { - auto open_selected_action = GUI::Action::create("Open", [this](const GUI::Action&) { auto files = selected_file_paths(); for (auto& file : files) @@ -678,7 +677,6 @@ String HackStudioWidget::get_full_path_of_serenity_source(const String& file) RefPtr<EditorWrapper> HackStudioWidget::get_editor_of_file(const String& file_name) { - String file_path = file_name; // TODO: We can probably do a more specific condition here, something like diff --git a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp index 66a447679e..29018894ad 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp +++ b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp @@ -300,7 +300,6 @@ NonnullRefPtrVector<Declaration> ParserAutoComplete::get_global_declarations(con String ParserAutoComplete::document_path_from_include_path(const StringView& include_path) const { - static Regex<PosixExtended> library_include("<(.+)>"); static Regex<PosixExtended> user_defined_include("\"(.+)\""); diff --git a/Userland/Libraries/LibC/netdb.cpp b/Userland/Libraries/LibC/netdb.cpp index 0fb7b72259..324e48204d 100644 --- a/Userland/Libraries/LibC/netdb.cpp +++ b/Userland/Libraries/LibC/netdb.cpp @@ -191,7 +191,6 @@ static String gethostbyaddr_name_buffer; hostent* gethostbyaddr(const void* addr, socklen_t addr_size, int type) { - if (type != AF_INET) { errno = EAFNOSUPPORT; return nullptr; diff --git a/Userland/Libraries/LibC/sys/ptrace.cpp b/Userland/Libraries/LibC/sys/ptrace.cpp index 8a45e4d6cc..de422aaaab 100644 --- a/Userland/Libraries/LibC/sys/ptrace.cpp +++ b/Userland/Libraries/LibC/sys/ptrace.cpp @@ -12,7 +12,6 @@ extern "C" { int ptrace(int request, pid_t tid, void* addr, int data) { - // PT_PEEK needs special handling since the syscall wrapper // returns the peeked value as an int, which can be negative because of the cast. // When using PT_PEEK, the user can check if an error occurred diff --git a/Userland/Libraries/LibCore/DateTime.cpp b/Userland/Libraries/LibCore/DateTime.cpp index a8599f4a89..7791525485 100644 --- a/Userland/Libraries/LibCore/DateTime.cpp +++ b/Userland/Libraries/LibCore/DateTime.cpp @@ -84,7 +84,6 @@ void DateTime::set_time(unsigned year, unsigned month, unsigned day, unsigned ho String DateTime::to_string(const String& format) const { - const char wday_short_names[7][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; diff --git a/Userland/Libraries/LibCore/File.cpp b/Userland/Libraries/LibCore/File.cpp index 88a5ca4cdb..bd3d417d9e 100644 --- a/Userland/Libraries/LibCore/File.cpp +++ b/Userland/Libraries/LibCore/File.cpp @@ -325,7 +325,6 @@ Result<void, File::CopyError> File::copy_file_or_directory(const String& dst_pat Result<void, File::CopyError> File::copy_file(const String& dst_path, const struct stat& src_stat, File& source) { - int dst_fd = creat(dst_path.characters(), 0666); if (dst_fd < 0) { if (errno != EISDIR) diff --git a/Userland/Libraries/LibCore/LocalSocket.cpp b/Userland/Libraries/LibCore/LocalSocket.cpp index 189c567347..58f43a367a 100644 --- a/Userland/Libraries/LibCore/LocalSocket.cpp +++ b/Userland/Libraries/LibCore/LocalSocket.cpp @@ -31,7 +31,6 @@ LocalSocket::LocalSocket(int fd, Object* parent) LocalSocket::LocalSocket(Object* parent) : Socket(Socket::Type::Local, parent) { - #ifdef SOCK_NONBLOCK int fd = socket(AF_LOCAL, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); #else diff --git a/Userland/Libraries/LibCrypto/Cipher/AES.cpp b/Userland/Libraries/LibCrypto/Cipher/AES.cpp index ba59218cbb..796e4f9fa4 100644 --- a/Userland/Libraries/LibCrypto/Cipher/AES.cpp +++ b/Userland/Libraries/LibCrypto/Cipher/AES.cpp @@ -288,7 +288,6 @@ void AESCipher::encrypt_block(const AESCipherBlock& in, AESCipherBlock& out) void AESCipher::decrypt_block(const AESCipherBlock& in, AESCipherBlock& out) { - u32 s0, s1, s2, s3, t0, t1, t2, t3; size_t r { 0 }; diff --git a/Userland/Libraries/LibDebug/DebugSession.h b/Userland/Libraries/LibDebug/DebugSession.h index e707c6755e..0e9057cb3c 100644 --- a/Userland/Libraries/LibDebug/DebugSession.h +++ b/Userland/Libraries/LibDebug/DebugSession.h @@ -185,7 +185,6 @@ private: template<typename Callback> void DebugSession::run(DesiredInitialDebugeeState initial_debugee_state, Callback callback) { - enum class State { FirstIteration, FreeRun, diff --git a/Userland/Libraries/LibGUI/EditingEngine.cpp b/Userland/Libraries/LibGUI/EditingEngine.cpp index be1843e9c4..e3ada4fbf9 100644 --- a/Userland/Libraries/LibGUI/EditingEngine.cpp +++ b/Userland/Libraries/LibGUI/EditingEngine.cpp @@ -504,7 +504,6 @@ TextPosition EditingEngine::find_end_of_next_word() void EditingEngine::move_to_end_of_next_word() { - m_editor->set_cursor(find_end_of_next_word()); } diff --git a/Userland/Libraries/LibGUI/VimEditingEngine.cpp b/Userland/Libraries/LibGUI/VimEditingEngine.cpp index 9e3734e264..6de2c23b0d 100644 --- a/Userland/Libraries/LibGUI/VimEditingEngine.cpp +++ b/Userland/Libraries/LibGUI/VimEditingEngine.cpp @@ -124,7 +124,6 @@ void VimCursor::move_backwards() void VimMotion::add_key_code(KeyCode key, [[maybe_unused]] bool ctrl, bool shift, [[maybe_unused]] bool alt) { - if (is_complete()) return; diff --git a/Userland/Libraries/LibLine/Editor.cpp b/Userland/Libraries/LibLine/Editor.cpp index f48da0c2cc..36dcffae4d 100644 --- a/Userland/Libraries/LibLine/Editor.cpp +++ b/Userland/Libraries/LibLine/Editor.cpp @@ -1088,7 +1088,6 @@ void Editor::cleanup_suggestions() bool Editor::search(const StringView& phrase, bool allow_empty, bool from_beginning) { - int last_matching_offset = -1; bool found = false; diff --git a/Userland/Libraries/LibLine/SuggestionManager.cpp b/Userland/Libraries/LibLine/SuggestionManager.cpp index 7f00ad7b6a..dfd6bc003c 100644 --- a/Userland/Libraries/LibLine/SuggestionManager.cpp +++ b/Userland/Libraries/LibLine/SuggestionManager.cpp @@ -84,7 +84,6 @@ const CompletionSuggestion& SuggestionManager::suggest() void SuggestionManager::set_current_suggestion_initiation_index(size_t index) { - if (m_last_shown_suggestion_display_length) m_last_shown_suggestion.start_index = index - m_next_suggestion_static_offset - m_last_shown_suggestion_display_length; else diff --git a/Userland/Libraries/LibRegex/RegexByteCode.cpp b/Userland/Libraries/LibRegex/RegexByteCode.cpp index 5e7051074f..a85b6e87db 100644 --- a/Userland/Libraries/LibRegex/RegexByteCode.cpp +++ b/Userland/Libraries/LibRegex/RegexByteCode.cpp @@ -210,7 +210,6 @@ ALWAYS_INLINE ExecutionResult OpCode_FailForks::execute(const MatchInput& input, ALWAYS_INLINE ExecutionResult OpCode_Jump::execute(const MatchInput&, MatchState& state, MatchOutput&) const { - state.instruction_position += offset(); return ExecutionResult::Continue; } diff --git a/Userland/Shell/Builtin.cpp b/Userland/Shell/Builtin.cpp index aea7492449..e44b492110 100644 --- a/Userland/Shell/Builtin.cpp +++ b/Userland/Shell/Builtin.cpp @@ -133,7 +133,6 @@ int Shell::builtin_bg(int argc, const char** argv) int Shell::builtin_type(int argc, const char** argv) { - Vector<const char*> commands; bool dont_show_function_source = false; diff --git a/Userland/Utilities/id.cpp b/Userland/Utilities/id.cpp index 9b8a0c8e31..b9c66d442e 100644 --- a/Userland/Utilities/id.cpp +++ b/Userland/Utilities/id.cpp @@ -109,7 +109,6 @@ static bool print_gid_list() static bool print_full_id_list() { - uid_t uid = getuid(); gid_t gid = getgid(); struct passwd* pw = getpwuid(uid); diff --git a/Userland/Utilities/test-bindtodevice.cpp b/Userland/Utilities/test-bindtodevice.cpp index 5552f3149b..278d043417 100644 --- a/Userland/Utilities/test-bindtodevice.cpp +++ b/Userland/Utilities/test-bindtodevice.cpp @@ -20,7 +20,6 @@ static void test_send(int); static void test(Function<void(int)> test_fn) { - int fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (fd < 0) { perror("socket"); |