diff --git a/AK/Vector.h b/AK/Vector.h index 0fb57faa9d..362ad9db3b 100644 --- a/AK/Vector.h +++ b/AK/Vector.h @@ -398,7 +398,7 @@ public: void empend(Args&&... args) { grow_capacity(m_size + 1); - new (slot(m_size)) T(forward(args)...); + new (slot(m_size)) T { forward(args)... }; ++m_size; } diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp index 55e29eb294..73a1c0b130 100644 --- a/Kernel/FileSystem/Ext2FileSystem.cpp +++ b/Kernel/FileSystem/Ext2FileSystem.cpp @@ -1433,8 +1433,8 @@ KResult Ext2FS::create_directory(InodeIdentifier parent_id, const String& name, #endif Vector entries; - entries.empend(".", inode->identifier(), EXT2_FT_DIR); - entries.empend("..", parent_id, EXT2_FT_DIR); + entries.empend(".", inode->identifier(), static_cast(EXT2_FT_DIR)); + entries.empend("..", parent_id, static_cast(EXT2_FT_DIR)); bool success = static_cast(*inode).write_directory(entries); ASSERT(success); diff --git a/Libraries/LibRegex/RegexByteCode.h b/Libraries/LibRegex/RegexByteCode.h index 6701d7c887..dbb78cbf4b 100644 --- a/Libraries/LibRegex/RegexByteCode.h +++ b/Libraries/LibRegex/RegexByteCode.h @@ -191,7 +191,7 @@ public: ByteCode bytecode; bytecode.empend(static_cast(OpCodeId::Compare)); - bytecode.empend(1); // number of arguments + bytecode.empend(static_cast(1)); // number of arguments ByteCode arguments; @@ -209,7 +209,7 @@ public: ByteCode bytecode; bytecode.empend(static_cast(OpCodeId::Compare)); - bytecode.empend(1); // number of arguments + bytecode.empend(static_cast(1)); // number of arguments ByteCode arguments; diff --git a/Services/LookupServer/DNSRequest.cpp b/Services/LookupServer/DNSRequest.cpp index 62f984c7eb..561e988ac9 100644 --- a/Services/LookupServer/DNSRequest.cpp +++ b/Services/LookupServer/DNSRequest.cpp @@ -32,7 +32,7 @@ #include #include -#define C_IN 1 +const u16 C_IN = 1; DNSRequest::DNSRequest() : m_id(arc4random_uniform(UINT16_MAX))