diff --git a/AK/StringImpl.h b/AK/StringImpl.h index d8999df3701..ed796ccd7c2 100644 --- a/AK/StringImpl.h +++ b/AK/StringImpl.h @@ -82,7 +82,6 @@ private: ConstructTheEmptyStringImpl }; explicit StringImpl(ConstructTheEmptyStringImplTag) - : m_fly(true) { m_inline_buffer[0] = '\0'; } @@ -97,7 +96,6 @@ private: size_t m_length { 0 }; mutable unsigned m_hash { 0 }; mutable bool m_has_hash { false }; - mutable bool m_fly { false }; char m_inline_buffer[0]; }; diff --git a/Libraries/LibIPC/Message.h b/Libraries/LibIPC/Message.h index 9dfbbebce68..7d1b741225a 100644 --- a/Libraries/LibIPC/Message.h +++ b/Libraries/LibIPC/Message.h @@ -67,7 +67,6 @@ public: private: Vector m_data; - bool m_fds_taken { false }; Vector, 1> m_fds; #ifdef AK_OS_WINDOWS Vector m_handle_offsets; diff --git a/Libraries/LibJS/AST.h b/Libraries/LibJS/AST.h index 8dd04fa60aa..a2cbed7f582 100644 --- a/Libraries/LibJS/AST.h +++ b/Libraries/LibJS/AST.h @@ -1397,11 +1397,10 @@ private: class ClassField final : public ClassElement { public: - ClassField(SourceRange source_range, NonnullRefPtr key, RefPtr init, bool contains_direct_call_to_eval, bool is_static) + ClassField(SourceRange source_range, NonnullRefPtr key, RefPtr init, bool is_static) : ClassElement(move(source_range), is_static) , m_key(move(key)) , m_initializer(move(init)) - , m_contains_direct_call_to_eval(contains_direct_call_to_eval) { } @@ -1418,15 +1417,13 @@ public: private: NonnullRefPtr m_key; RefPtr m_initializer; - bool m_contains_direct_call_to_eval { false }; }; class StaticInitializer final : public ClassElement { public: - StaticInitializer(SourceRange source_range, NonnullRefPtr function_body, bool contains_direct_call_to_eval) + StaticInitializer(SourceRange source_range, NonnullRefPtr function_body) : ClassElement(move(source_range), true) , m_function_body(move(function_body)) - , m_contains_direct_call_to_eval(contains_direct_call_to_eval) { } @@ -1437,7 +1434,6 @@ public: private: NonnullRefPtr m_function_body; - bool m_contains_direct_call_to_eval { false }; }; class SuperExpression final : public Expression { diff --git a/Libraries/LibJS/Parser.cpp b/Libraries/LibJS/Parser.cpp index 51b20467b8e..1d9eb9d24fd 100644 --- a/Libraries/LibJS/Parser.cpp +++ b/Libraries/LibJS/Parser.cpp @@ -1539,7 +1539,7 @@ NonnullRefPtr Parser::parse_class_expression(bool expect_ parse_statement_list(static_init_block); consume(TokenType::CurlyClose); - elements.append(create_ast_node({ m_source_code, static_start.position(), position() }, move(static_init_block), static_init_scope.contains_direct_call_to_eval())); + elements.append(create_ast_node({ m_source_code, static_start.position(), position() }, move(static_init_block))); continue; } else { expected("property key"); @@ -1591,7 +1591,6 @@ NonnullRefPtr Parser::parse_class_expression(bool expect_ syntax_error("Class cannot have field named 'constructor'"_string); RefPtr initializer; - bool contains_direct_call_to_eval = false; if (match(TokenType::Equals)) { consume(); @@ -1602,10 +1601,9 @@ NonnullRefPtr Parser::parse_class_expression(bool expect_ auto class_scope_node = create_ast_node({ m_source_code, rule_start.position(), position() }); auto class_field_scope = ScopePusher::class_field_scope(*this, *class_scope_node); initializer = parse_expression(2); - contains_direct_call_to_eval = class_field_scope.contains_direct_call_to_eval(); } - elements.append(create_ast_node({ m_source_code, rule_start.position(), position() }, property_key.release_nonnull(), move(initializer), contains_direct_call_to_eval, is_static)); + elements.append(create_ast_node({ m_source_code, rule_start.position(), position() }, property_key.release_nonnull(), move(initializer), is_static)); consume_or_insert_semicolon(); } } diff --git a/Libraries/LibMedia/Color/ColorConverter.cpp b/Libraries/LibMedia/Color/ColorConverter.cpp index df63e0ce02e..ffce3c20269 100644 --- a/Libraries/LibMedia/Color/ColorConverter.cpp +++ b/Libraries/LibMedia/Color/ColorConverter.cpp @@ -152,7 +152,7 @@ DecoderErrorOr ColorConverter::create(u8 bit_depth, CodingIndepe bool should_skip_color_remapping = output_cicp.color_primaries() == input_cicp.color_primaries() && output_cicp.transfer_characteristics() == input_cicp.transfer_characteristics(); FloatMatrix4x4 input_conversion_matrix = color_conversion_matrix * range_scaling_matrix * integer_scaling_matrix; - return ColorConverter(bit_depth, input_cicp, should_skip_color_remapping, should_tonemap, input_conversion_matrix, to_linear_lookup_table, color_primaries_matrix_4x4, to_non_linear_lookup_table); + return ColorConverter(input_cicp, should_skip_color_remapping, should_tonemap, input_conversion_matrix, to_linear_lookup_table, color_primaries_matrix_4x4, to_non_linear_lookup_table); } } diff --git a/Libraries/LibMedia/Color/ColorConverter.h b/Libraries/LibMedia/Color/ColorConverter.h index 79e3417eab2..16e300d3527 100644 --- a/Libraries/LibMedia/Color/ColorConverter.h +++ b/Libraries/LibMedia/Color/ColorConverter.h @@ -247,9 +247,8 @@ private: static constexpr size_t to_linear_size = 64; static constexpr size_t to_non_linear_size = 64; - ColorConverter(u8 bit_depth, CodingIndependentCodePoints cicp, bool should_skip_color_remapping, bool should_tonemap, FloatMatrix4x4 input_conversion_matrix, InterpolatedLookupTable to_linear_lookup, FloatMatrix4x4 color_space_conversion_matrix, InterpolatedLookupTable to_non_linear_lookup) - : m_bit_depth(bit_depth) - , m_cicp(cicp) + ColorConverter(CodingIndependentCodePoints cicp, bool should_skip_color_remapping, bool should_tonemap, FloatMatrix4x4 input_conversion_matrix, InterpolatedLookupTable to_linear_lookup, FloatMatrix4x4 color_space_conversion_matrix, InterpolatedLookupTable to_non_linear_lookup) + : m_cicp(cicp) , m_should_skip_color_remapping(should_skip_color_remapping) , m_should_tonemap(should_tonemap) , m_input_conversion_matrix(input_conversion_matrix) @@ -259,7 +258,6 @@ private: { } - u8 m_bit_depth; CodingIndependentCodePoints m_cicp; bool m_should_skip_color_remapping; bool m_should_tonemap; diff --git a/Libraries/LibMedia/PlaybackManager.h b/Libraries/LibMedia/PlaybackManager.h index 0682deef9db..e7fa5707c4b 100644 --- a/Libraries/LibMedia/PlaybackManager.h +++ b/Libraries/LibMedia/PlaybackManager.h @@ -179,7 +179,6 @@ private: VideoFrameQueue m_frame_queue; RefPtr m_state_update_timer; - unsigned m_decoding_buffer_time_ms = 16; RefPtr m_decode_thread; NonnullOwnPtr m_decoder; diff --git a/Libraries/LibTLS/TLSv12.cpp b/Libraries/LibTLS/TLSv12.cpp index cfc1e37ae9e..c7b99e74577 100644 --- a/Libraries/LibTLS/TLSv12.cpp +++ b/Libraries/LibTLS/TLSv12.cpp @@ -147,10 +147,9 @@ ErrorOr TLSv12::set_close_on_exec(bool enabled) return m_socket->set_close_on_exec(enabled); } -TLSv12::TLSv12(NonnullOwnPtr socket, SSL_CTX* ssl_ctx, SSL* ssl, BIO* bio) +TLSv12::TLSv12(NonnullOwnPtr socket, SSL_CTX* ssl_ctx, SSL* ssl) : m_ssl_ctx(ssl_ctx) , m_ssl(ssl) - , m_bio(bio) , m_socket(move(socket)) { m_socket->on_ready_to_read = [this] { @@ -244,7 +243,7 @@ ErrorOr> TLSv12::connect_internal(NonnullOwnPtr, SSL_CTX*, SSL*, BIO*); + explicit TLSv12(NonnullOwnPtr, SSL_CTX*, SSL*); static ErrorOr> connect_internal(NonnullOwnPtr, ByteString const&, Options); @@ -73,7 +73,6 @@ private: SSL_CTX* m_ssl_ctx { nullptr }; SSL* m_ssl { nullptr }; - BIO* m_bio { nullptr }; // Keep this around or the socket will be closed NonnullOwnPtr m_socket; diff --git a/Libraries/LibWeb/IndexedDB/Internal/KeyGenerator.h b/Libraries/LibWeb/IndexedDB/Internal/KeyGenerator.h index 9b3e1972a80..5f7449a44cc 100644 --- a/Libraries/LibWeb/IndexedDB/Internal/KeyGenerator.h +++ b/Libraries/LibWeb/IndexedDB/Internal/KeyGenerator.h @@ -18,7 +18,8 @@ private: // The current number is always a positive integer less than or equal to 2^53 (9007199254740992) + 1. // The initial value of a key generator's current number is 1, set when the associated object store is created. // The current number is incremented as keys are generated, and may be updated to a specific value by using explicit keys. - u64 current_number { 1 }; + // FIXME: Implement support for KeyGenerator in ObjectStore. + [[maybe_unused]] u64 current_number { 1 }; }; } diff --git a/Libraries/LibWeb/ServiceWorker/Registration.h b/Libraries/LibWeb/ServiceWorker/Registration.h index 55305e35095..f9ef66c7d1a 100644 --- a/Libraries/LibWeb/ServiceWorker/Registration.h +++ b/Libraries/LibWeb/ServiceWorker/Registration.h @@ -68,8 +68,9 @@ private: // FIXME: Spec bug: A service worker registration has an associated NavigationPreloadManager object. // This can't possibly be true. The association is the other way around. - bool m_navigation_preload_enabled = { false }; // https://w3c.github.io/ServiceWorker/#service-worker-registration-navigation-preload-enabled-flag - ByteString m_navigation_preload_header_value; // https://w3c.github.io/ServiceWorker/#service-worker-registration-navigation-preload-header-value + // FIXME: Investigate if this is implemented. + [[maybe_unused]] bool m_navigation_preload_enabled = { false }; // https://w3c.github.io/ServiceWorker/#service-worker-registration-navigation-preload-enabled-flag + ByteString m_navigation_preload_header_value; // https://w3c.github.io/ServiceWorker/#service-worker-registration-navigation-preload-header-value }; struct RegistrationKey { diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index 101daeccd2d..9785493ee4f 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -136,10 +136,6 @@ add_library(GenericClangPlugin INTERFACE) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang$") add_cxx_compile_options(-Wno-overloaded-virtual) - # FIXME: Re-enable this check when the warning stops triggering, or document why we can't stop it from triggering. - # For now, there is a lot of unused private fields in LibWeb that trigger this that could be removed. - # See issue #14137 for details - add_cxx_compile_options(-Wno-unused-private-field) if (ENABLE_FUZZERS_LIBFUZZER) add_cxx_compile_options(-fsanitize=fuzzer) diff --git a/Meta/gn/build/BUILD.gn b/Meta/gn/build/BUILD.gn index b1acaeeb406..eac46adfd78 100644 --- a/Meta/gn/build/BUILD.gn +++ b/Meta/gn/build/BUILD.gn @@ -126,7 +126,6 @@ config("compiler_defaults") { "-Wstring-conversion", "-Wno-user-defined-literals", "-fconstexpr-steps=16777216", - "-Wno-unused-private-field", "-Wno-implicit-const-int-float-conversion", "-Wno-vla-cxx-extension", "-Wno-unqualified-std-cast-call",