Bug 228779 - Fix XR related clang warnings in WPE
Summary: Fix XR related clang warnings in WPE
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebXR (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Imanol Fernandez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-04 09:10 PDT by Imanol Fernandez
Modified: 2021-08-05 00:41 PDT (History)
3 users (show)

See Also:


Attachments
Patch (5.98 KB, patch)
2021-08-04 09:15 PDT, Imanol Fernandez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Imanol Fernandez 2021-08-04 09:10:23 PDT
[4278/6854] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/platform/xr/openxr/OpenXRInput.cpp.o
In file included from ../../Source/WebCore/platform/xr/openxr/OpenXRInput.cpp:21:
In file included from ../../Source/WebCore/platform/xr/openxr/OpenXRInput.h:24:
../../Source/WebCore/platform/xr/openxr/OpenXRInputMappings.h:118:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    { OpenXRAxisType::Touchpad, "/input/trackpad" }
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      {                                          }
1 warning generated.
[4290/6854] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/platform/xr/openxr/OpenXRSwapchain.cpp.o
In file included from ../../Source/WebCore/platform/xr/openxr/OpenXRSwapchain.cpp:23:
../../Source/WebCore/platform/xr/openxr/OpenXRSwapchain.h:48:16: warning: private field 'm_instance' is not used [-Wunused-private-field]
    XrInstance m_instance;
               ^
../../Source/WebCore/platform/xr/openxr/OpenXRSwapchain.h:49:15: warning: private field 'm_session' is not used [-Wunused-private-field]
    XrSession m_session;
              ^
2 warnings generated.
[4291/6854] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/platform/xr/openxr/OpenXRInputSource.cpp.o
In file included from ../../Source/WebCore/platform/xr/openxr/OpenXRInputSource.cpp:21:
In file included from ../../Source/WebCore/platform/xr/openxr/OpenXRInputSource.h:24:
../../Source/WebCore/platform/xr/openxr/OpenXRInputMappings.h:118:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    { OpenXRAxisType::Touchpad, "/input/trackpad" }
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      {                                          }
../../Source/WebCore/platform/xr/openxr/OpenXRInputSource.cpp:302:30: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
    auto queryActionState = [this, &hasValue](XrAction action, auto& value, auto defaultValue) {
                             ^~~~~
2 warnings generated.
[4309/6854] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/platform/xr/openxr/PlatformXROpenXR.cpp.o
In file included from ../../Source/WebCore/platform/xr/openxr/PlatformXROpenXR.cpp:26:
In file included from ../../Source/WebCore/platform/xr/openxr/OpenXRInput.h:24:
../../Source/WebCore/platform/xr/openxr/OpenXRInputMappings.h:118:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    { OpenXRAxisType::Touchpad, "/input/trackpad" }
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      {                                          }
1 warning generated.
[4327/6854] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-043dd90b-21.cpp.o
In file included from WebCore/DerivedSources/unified-sources/UnifiedSource-043dd90b-21.cpp:6:
../../Source/WebCore/rendering/style/RenderStyle.cpp:1857:55: warning: implicit conversion from 'const int' to 'float' changes value from 33554429 to 33554428 [-Wimplicit-const-int-float-conversion]
        fontWordSpacing = value.nonNanCalculatedValue(maxValueForCssLength);
                                ~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~
1 warning generated.
[6427/6854] Building CXX object Source/WebKit/CMakeFiles/WebKit.dir/__/__/DerivedSources/WebKit/unified-sources/UnifiedSource-50d0d8dd-13.cpp.o
In file included from DerivedSources/WebKit/unified-sources/UnifiedSource-50d0d8dd-13.cpp:6:
../../Source/WebKit/Shared/XR/XRDeviceProxy.cpp:79:24: warning: mixture of designated and non-designated initializers in the same initializer list is a C99 extension [-Wc99-designator]
        views.append({ .active = true, Eye::Left });
                       ^~~~~~~~~~~~~~
../../Source/WebKit/Shared/XR/XRDeviceProxy.cpp:79:40: note: first non-designated initializer is here
        views.append({ .active = true, Eye::Left });
                                       ^~~~~~~~~
../../Source/WebKit/Shared/XR/XRDeviceProxy.cpp:80:24: warning: mixture of designated and non-designated initializers in the same initializer list is a C99 extension [-Wc99-designator]
        views.append({ .active = true, Eye::Right });
                       ^~~~~~~~~~~~~~
../../Source/WebKit/Shared/XR/XRDeviceProxy.cpp:80:40: note: first non-designated initializer is here
        views.append({ .active = true, Eye::Right });
                                       ^~~~~~~~~~
../../Source/WebKit/Shared/XR/XRDeviceProxy.cpp:82:24: warning: mixture of designated and non-designated initializers in the same initializer list is a C99 extension [-Wc99-designator]
        views.append({ .active = true, Eye::None });
                       ^~~~~~~~~~~~~~
../../Source/WebKit/Shared/XR/XRDeviceProxy.cpp:82:40: note: first non-designated initializer is here
        views.append({ .active = true, Eye::None });
                                       ^~~~~~~~~
3 warnings generated. iews.append({ .active = true, Eye::None });
                                       ^~~~~~~~~
3 warnings generated.
Comment 1 Imanol Fernandez 2021-08-04 09:15:41 PDT
Created attachment 434907 [details]
Patch
Comment 2 EWS 2021-08-05 00:40:58 PDT
Committed r280681 (240283@main): <https://commits.webkit.org/240283@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434907 [details].
Comment 3 Radar WebKit Bug Importer 2021-08-05 00:41:17 PDT
<rdar://problem/81554223>