Bug 191960 - [Win][Clang] SOFT_LINK reports warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]
Summary: [Win][Clang] SOFT_LINK reports warning: implicit conversion between pointer-t...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks: 171618
  Show dependency treegraph
 
Reported: 2018-11-25 21:41 PST by Fujii Hironori
Modified: 2018-11-26 18:04 PST (History)
7 users (show)

See Also:


Attachments
Patch (5.88 KB, patch)
2018-11-25 22:44 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2 (8.88 MB, application/zip)
2018-11-26 17:35 PST, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2018-11-25 21:41:10 PST
[Win][Clang] SOFT_LINK reports warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]

clang-cl reports following warnings:

> [5018/6237] Building CXX object Source\WebCore\CMakeFiles\WebCore.dir\rendering\RenderThemeWin.cpp.obj
> ..\..\Source\WebCore\rendering\RenderThemeWin.cpp(151,1):  warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]
> SOFT_LINK(uxtheme, OpenThemeData, HANDLE, WINAPI, (HWND hwnd, LPCWSTR pszClassList), (hwnd, pszClassList))
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> DerivedSources\ForwardingHeaders\wtf/win/SoftLinking.h(51,124):  note: expanded from macro 'SOFT_LINK'
>             softLink##functionName = reinterpret_cast<resultType(callingConvention*)parameterDeclarations>(::EncodePointer(SOFT_LINK_GETPROCADDRESS(library##Library(), #functionName))); \
>                                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> DerivedSources\ForwardingHeaders\wtf/win/SoftLinking.h(39,34):  note: expanded from macro 'SOFT_LINK_GETPROCADDRESS'
> #define SOFT_LINK_GETPROCADDRESS GetProcAddress
>                                  ^
> ..\..\Source\WebCore\rendering\RenderThemeWin.cpp(151,1):  warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]
> SOFT_LINK(uxtheme, OpenThemeData, HANDLE, WINAPI, (HWND hwnd, LPCWSTR pszClassList), (hwnd, pszClassList))
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> DerivedSources\ForwardingHeaders\wtf/win/SoftLinking.h(52,104):  note: expanded from macro 'SOFT_LINK'
>         return reinterpret_cast<resultType (callingConvention*) parameterDeclarations>(::DecodePointer(softLink##functionName)) parameterNames; \
>                                                                                                        ^~~~~~~~~~~~~~~~~~~~~~
> <scratch space>(239,1):  note: expanded from here
> softLinkOpenThemeData
> ^~~~~~~~~~~~~~~~~~~~~


> ..\..\Source\WebKitLegacy\win\WebView.cpp(221,1):  warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]
> SOFT_LINK_OPTIONAL(USER32, GetGestureInfo, BOOL, WINAPI, (HGESTUREINFO, PGESTUREINFO));
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> DerivedSources\ForwardingHeaders\wtf/win/SoftLinking.h(63,75):  note: expanded from macro 'SOFT_LINK_OPTIONAL'
>             ptr = reinterpret_cast<functionName##PtrType>(::EncodePointer(SOFT_LINK_GETPROCADDRESS(library##Library(), #functionName))); \
>                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> DerivedSources\ForwardingHeaders\wtf/win/SoftLinking.h(39,34):  note: expanded from macro 'SOFT_LINK_GETPROCADDRESS'
> #define SOFT_LINK_GETPROCADDRESS GetProcAddress
>                                  ^
Comment 1 Fujii Hironori 2018-11-25 22:24:55 PST
It has introduced in 

  Bug 163331 – [Win] Encode function pointers.
Comment 2 Fujii Hironori 2018-11-25 22:44:44 PST
Created attachment 355621 [details]
Patch
Comment 3 Build Bot 2018-11-26 17:35:57 PST
Comment on attachment 355621 [details]
Patch

Attachment 355621 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/10159992

New failing tests:
media/no-fullscreen-when-hidden.html
Comment 4 Build Bot 2018-11-26 17:35:59 PST
Created attachment 355697 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 5 Fujii Hironori 2018-11-26 18:03:24 PST
Comment on attachment 355621 [details]
Patch

Clearing flags on attachment: 355621

Committed r238541: <https://trac.webkit.org/changeset/238541>
Comment 6 Fujii Hironori 2018-11-26 18:03:27 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-11-26 18:04:57 PST
<rdar://problem/46263596>