[Webkit-unassigned] [Bug 232989] New: [GTK] 2.34.1 Compiler warnings

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 11 02:25:13 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=232989

            Bug ID: 232989
           Summary: [GTK] 2.34.1 Compiler warnings
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcrha at redhat.com
                CC: bugs-noreply at webkitgtk.org

I configured the 2.34.1 release tarball sources as this:

-- Enabled features:
--  ENABLE_BUBBLEWRAP_SANDBOX ..................... ON
--  ENABLE_DRAG_SUPPORT                             ON
--  ENABLE_GAMEPAD ................................ OFF
--  ENABLE_GLES2                                    OFF
--  ENABLE_GTKDOC ................................. OFF
--  ENABLE_INTROSPECTION                            OFF
--  ENABLE_MEDIA_SOURCE ........................... ON
--  ENABLE_MINIBROWSER                              ON
--  ENABLE_QUARTZ_TARGET .......................... OFF
--  ENABLE_SPELLCHECK                               ON
--  ENABLE_TOUCH_EVENTS ........................... ON
--  ENABLE_VIDEO                                    ON
--  ENABLE_WAYLAND_TARGET ......................... OFF
--  ENABLE_WEBDRIVER                                ON
--  ENABLE_WEB_AUDIO .............................. ON
--  ENABLE_WEB_CRYPTO                               ON
--  ENABLE_X11_TARGET ............................. ON
--  USE_AVIF                                        OFF
--  USE_GTK4 ...................................... OFF
--  USE_LCMS                                        OFF
--  USE_LIBHYPHEN ................................. ON
--  USE_LIBNOTIFY                                   ON
--  USE_LIBSECRET ................................. ON
--  USE_OPENGL_OR_ES                                ON
--  USE_OPENJPEG .................................. ON
--  USE_SOUP2                                       OFF
--  USE_SYSTEMD ................................... ON
--  USE_WOFF2                                       ON
--  USE_WPE_RENDERER .............................. OFF

and I see several compiler warnings, some quite important, from my point of view.

[1026/5040] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-37.cpp.o
In file included from .../webkitgtk-2.34.1/_build/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-37.cpp:6:
.../webkitgtk-2.34.1/Source/JavaScriptCore/runtime/TemporalDuration.cpp: In function ‘JSC::PropertyName JSC::propertyName(JSC::VM&, unsigned int)’:
.../webkitgtk-2.34.1/Source/JavaScriptCore/runtime/TemporalDuration.cpp:45:1: warning: control reaches end of non-void function [-Wreturn-type]
   45 | }
      | ^

[1030/5040] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-38.cpp.o
In file included from .../webkitgtk-2.34.1/_build/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-38.cpp:2:
.../webkitgtk-2.34.1/Source/JavaScriptCore/runtime/TemporalObject.cpp: In function ‘double JSC::roundNumberToIncrement(double, double, JSC::RoundingMode)’:
.../webkitgtk-2.34.1/Source/JavaScriptCore/runtime/TemporalObject.cpp:331:1: warning: control reaches end of non-void function [-Wreturn-type]
  331 | }
      | ^

[2263/5040] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-7.cpp.o
In file included from .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-7.cpp:6:
.../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSAudioWorkletNodeOptions.cpp: In function ‘T WebCore::convertDictionary(JSC::JSGlobalObject&, JSC::JSValue) [with T = WebCore::AudioWorkletNodeOptions]’:
.../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSAudioWorkletNodeOptions.cpp:57:29: warning: ‘((unsigned int*)((char*)&result + offsetof(WebCore::AudioWorkletNodeOptions, WebCore::AudioWorkletNodeOptions::outputChannelCount.std::optional<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc> >::<unnamed>.std::_Optional_base<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, false, false>::_M_payload.std::_Optional_payload<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, false, false, false>::<unnamed>.std::_Optional_payload<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, true, false, false>::<unnamed>.std::
_Optional_payload_base<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc> >::_M_payload)))[2]’ is used uninitialized [-Wuninitialized]
   57 |     AudioWorkletNodeOptions result;
      |                             ^~~~~~

.../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSAudioWorkletNodeOptions.cpp:57:29: warning: ‘((unsigned int*)((char*)&result + offsetof(WebCore::AudioWorkletNodeOptions, WebCore::AudioWorkletNodeOptions::outputChannelCount.std::optional<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc> >::<unnamed>.std::_Optional_base<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, false, false>::_M_payload.std::_Optional_payload<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, false, false, false>::<unnamed>.std::_Optional_payload<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, true, false, false>::<unnamed>.std::
_Optional_payload_base<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc> >::_M_payload)))[3]’ is used uninitialized [-Wuninitialized]

[2312/5040] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-58.cpp.o
In file included from .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-58.cpp:1:
.../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaEncodingConfiguration.cpp: In function ‘T WebCore::convertDictionary(JSC::JSGlobalObject&, JSC::JSValue) [with T = WebCore::MediaEncodingConfiguration]’:
.../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaEncodingConfiguration.cpp:46:32: warning: ‘*(WebCore::VideoConfiguration*)((char*)&result + offsetof(WebCore::MediaEncodingConfiguration, WebCore::MediaEncodingConfiguration::<unnamed>.WebCore::MediaConfiguration::video.std::optional<WebCore::VideoConfiguration>::<unnamed>.std::_Optional_base<WebCore::VideoConfiguration, false, false>::<unnamed>)).WebCore::VideoConfiguration::width’ is used uninitialized [-Wuninitialized]
   46 |     MediaEncodingConfiguration result;
      |                                ^~~~~~

.../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaEncodingConfiguration.cpp:46:32: warning: ‘*(WebCore::VideoConfiguration*)((char*)&result + offsetof(WebCore::MediaEncodingConfiguration, WebCore::MediaEncodingConfiguration::<unnamed>.WebCore::MediaConfiguration::video.std::optional<WebCore::VideoConfiguration>::<unnamed>.std::_Optional_base<WebCore::VideoConfiguration, false, false>::<unnamed>))
.WebCore::VideoConfiguration::height’ is used uninitialized [-Wuninitialized]

[2313/5040] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-57.cpp.o
In file included from .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-57.cpp:3:
.../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaDecodingConfiguration.cpp: In function ‘T WebCore::convertDictionary(JSC::JSGlobalObject&, JSC::JSValue) [with T = WebCore::MediaDecodingConfiguration]’:
.../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaDecodingConfiguration.cpp:46:32: warning: ‘*(WebCore::VideoConfiguration*)((char*)&result + offsetof(WebCore::MediaDecodingConfiguration, WebCore::MediaDecodingConfiguration::<unnamed>.WebCore::MediaConfiguration::video.std::optional<WebCore::VideoConfiguration>::<unnamed>.std::_Optional_base<WebCore::VideoConfiguration, false, false>::<unnamed>))
.WebCore::VideoConfiguration::width’ is used uninitialized [-Wuninitialized]
   46 |     MediaDecodingConfiguration result;
      |                                ^~~~~~

.../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaDecodingConfiguration.cpp:46:32: warning: ‘*(WebCore::VideoConfiguration*)((char*)&result + offsetof(WebCore::MediaDecodingConfiguration, WebCore::MediaDecodingConfiguration::<unnamed>.WebCore::MediaConfiguration::video.std::optional<WebCore::VideoConfiguration>::<unnamed>.std::_Optional_base<WebCore::VideoConfiguration, false, false>::<unnamed>))
.WebCore::VideoConfiguration::height’ is used uninitialized [-Wuninitialized]

[2604/5040] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-207b877e-6.cpp.o
In file included from .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/unified-sources/UnifiedSource-207b877e-6.cpp:8:
.../webkitgtk-2.34.1/Source/WebCore/layout/integration/LayoutIntegrationLineIterator.cpp: In member function ‘WebCore::LayoutIntegration::RunIterator WebCore::LayoutIntegration::LineIterator::closestRunForLogicalLeftPosition(int, bool)’:
.../webkitgtk-2.34.1/Source/WebCore/layout/integration/LayoutIntegrationLineIterator.cpp:178:10: warning: ‘((WTF::RefCountedArray<const WebCore::LegacyInlineBox*, WTF::RawPtrTraits<const WebCore::LegacyInlineBox*> >*)((char*)&closestRun + offsetof(WebCore::LayoutIntegration::RunIterator, WebCore::LayoutIntegration::RunIterator::m_run.WebCore::LayoutIntegration::PathRun::m_pathVariant.WTF::Variant<WebCore::LayoutIntegration::RunIteratorLegacyPath>::__storage)))[1]
.WTF::RefCountedArray<const WebCore::LegacyInlineBox*>::m_data’ is used uninitialized [-Wuninitialized]
  178 |     auto closestRun = lastRun;
      |          ^~~~~~~~~~

.../webkitgtk-2.34.1/Source/WebCore/layout/integration/LayoutIntegrationLineIterator.cpp:178:10: warning: ‘*(WebCore::LayoutIntegration::RunIteratorLegacyPath*)((char*)&closestRun + offsetof(WebCore::LayoutIntegration::RunIterator, WebCore::LayoutIntegration::RunIterator::m_run.WebCore::LayoutIntegration::PathRun::m_pathVariant.WTF::Variant<WebCore::LayoutIntegration::RunIteratorLegacyPath>::<unnamed>))
.WebCore::LayoutIntegration::RunIteratorLegacyPath::m_inlineBox’ is used uninitialized [-Wuninitialized]

[2704/5040] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-50.cpp.o
In file included from .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-50.cpp:3:
.../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp: In member function ‘Out WTF::Detail::CallableWrapper< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3> >::call(In ...) [with CallableType = WebCore::DataURLDecoder::decode(const WTF::URL&, const WebCore::DataURLDecoder::ScheduleContext&, WebCore::DataURLDecoder::Mode, WebCore::DataURLDecoder::DecodeCompletionHandler&&)::<lambda()>; Out = void; In = {}]’:
.../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp:202:14: warning: ‘((WTF::StringImpl**)((char*)&callCompletionHandler + offsetof(WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248, WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248::__result.std::optional<WebCore::DataURLDecoder::Result>::<unnamed>.std::_Optional_base<WebCore::DataURLDecoder::Result, false, false>::_M_payload.std::_Optional_payload<WebCore::DataURLDecoder::Result, false, false, false>::<unnamed>.std::_Optional_payload<WebCore::DataURLDecoder::Result, true, false, false>::<unnamed>
.std::_Optional_payload_base<WebCore::DataURLDecoder::Result>::_M_payload)))[1]’ is used uninitialized [-Wuninitialized]

  202 |         auto callCompletionHandler = [result = WTFMove(result), completionHandler = WTFMove(decodeTask->completionHandler)]() mutable {
      |              ^~~~~~~~~~~~~~~~~~~~~

.../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp:202:14: warning: ‘*(WTF::StringImpl**)((char*)&callCompletionHandler + offsetof(WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248, WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248::__result.std::optional<WebCore::DataURLDecoder::Result>::<unnamed>
.std::_Optional_base<WebCore::DataURLDecoder::Result, false, false>::<unnamed>))’ is used uninitialized [-Wuninitialized]

.../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp:202:14: warning: ‘((WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>*)((char*)&callCompletionHandler + offsetof(WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248, WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248::__result.std::optional<WebCore::DataURLDecoder::Result>::<unnamed>.std::_Optional_base<WebCore::DataURLDecoder::Result, false, false>::_M_payload.std::_Optional_payload<WebCore::DataURLDecoder::Result, false, false, false>::<unnamed>.std::_Optional_payload<WebCore::DataURLDecoder::Result, true, false, false>::<unnamed>.std::_Optional_payload_base<WebCore::DataURLDecoder::Result>::_M_payload) + 8))[1]
.WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>::m_buffer’ is used uninitialized [-Wuninitialized]

.../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp:202:14: warning: ‘((WTF::StringImpl**)((char*)&callCompletionHandler + offsetof(WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248, WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248::__result.std::optional<WebCore::DataURLDecoder::Result>::<unnamed>.std::_Optional_base<WebCore::DataURLDecoder::Result, false, false>::_M_payload.std::_Optional_payload<WebCore::DataURLDecoder::Result, false, false, false>::<unnamed>.std::_Optional_payload<WebCore::DataURLDecoder::Result, true, false, false>::<unnamed>
.std::_Optional_payload_base<WebCore::DataURLDecoder::Result>::_M_payload)))[2]’ is used uninitialized [-Wuninitialized]

.../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp:202:14: warning: ‘((WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>*)((char*)&callCompletionHandler + offsetof(WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248, WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248::__result.std::optional<WebCore::DataURLDecoder::Result>::<unnamed>.std::_Optional_base<WebCore::DataURLDecoder::Result, false, false>::_M_payload.std::_Optional_payload<WebCore::DataURLDecoder::Result, false, false, false>::<unnamed>.std::_Optional_payload<WebCore::DataURLDecoder::Result, true, false, false>::<unnamed>.std::_Optional_payload_base<WebCore::DataURLDecoder::Result>::_M_payload) + 8))[1]
.WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>::m_capacity’ is used uninitialized [-Wuninitialized]

.../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp:202:14: warning: ‘((WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>*)((char*)&callCompletionHandler + offsetof(WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248, WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248::__result.std::optional<WebCore::DataURLDecoder::Result>::<unnamed>.std::_Optional_base<WebCore::DataURLDecoder::Result, false, false>::_M_payload.std::_Optional_payload<WebCore::DataURLDecoder::Result, false, false, false>::<unnamed>.std::_Optional_payload<WebCore::DataURLDecoder::Result, true, false, false>::<unnamed>.std::_Optional_payload_base<WebCore::DataURLDecoder::Result>::_M_payload) + 8))[1]
.WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>::m_size’ is used uninitialized [-Wuninitialized]

================================================================================================================================

The (currently) latest build for the Fedora does not show all of those, but there are some important too:
https://kojipkgs.fedoraproject.org//packages/webkit2gtk3/2.34.1/6.fc36/data/logs/x86_64/build.log

I search for "[-w" (quotes for clarity only) to filter them out, after replacing "[-Wodr]" (quotes for clarity only) with something else, because there are a lot of those. One which may worth a note is:

In function 'memcpy',
    inlined from 'get' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WTF/Headers/wtf/Packed.h:146:15,
    inlined from '__conv_op ' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WTF/Headers/wtf/Packed.h:195:48,
    inlined from '__conv_op ' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WTF/Headers/wtf/RefPtr.h:89:57,
    inlined from 'isShared' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/JavaScriptCore/PrivateHeaders/JavaScriptCore/ArrayBuffer.h:84:36,
    inlined from 'isShared' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/JavaScriptCore/PrivateHeaders/JavaScriptCore/ArrayBuffer.h:202:31,
    inlined from 'unsharedBuffer' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/JavaScriptCore/PrivateHeaders/JavaScriptCore/ArrayBufferView.h:60:9,
    inlined from 'send' at /builddir/build/BUILD/webkitgtk-2.34.1/Source/WebCore/Modules/websockets/WebSocket.cpp:389:52,
    inlined from 'operator()' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WebCore/DerivedSources/JSWebSocket.cpp:535:5,
    inlined from 'toJS' at /builddir/build/BUILD/webkitgtk-2.34.1/Source/WebCore/bindings/js/JSDOMConvertBase.h:168:18,
    inlined from 'jsWebSocketPrototypeFunction_send2Body' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WebCore/DerivedSources/JSWebSocket.cpp:535:5,
    inlined from 'jsWebSocketPrototypeFunction_sendOverloadDispatcher' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WebCore/DerivedSources/JSWebSocket.cpp:576:13,
    inlined from 'call' at /builddir/build/BUILD/webkitgtk-2.34.1/Source/WebCore/bindings/js/JSDOMOperation.h:63:9,
    inlined from 'jsWebSocketPrototypeFunction_send' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WebCore/DerivedSources/JSWebSocket.cpp:586:96:
/usr/include/bits/string_fortified.h:29:33: warning: '__builtin_memcpy' reading 6 bytes from a region of size 0 [-Wstringop-overread]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |                                 ^

I do not know whether it's a false positive or not.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211111/5a978731/attachment-0001.htm>


More information about the webkit-unassigned mailing list