[webkit-reviews] review requested: [Bug 182479] [Win] Fix MSVC's treating __attribute__((warn_unused_result)) : [Attachment 333152] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 7 19:37:33 PST 2018


Yousuke Kimoto <Yousuke.Kimoto at sony.com> has asked  for review:
Bug 182479: [Win] Fix MSVC's treating __attribute__((warn_unused_result))
https://bugs.webkit.org/show_bug.cgi?id=182479

Attachment 333152: Patch

https://bugs.webkit.org/attachment.cgi?id=333152&action=review




--- Comment #7 from Yousuke Kimoto <Yousuke.Kimoto at sony.com> ---
Comment on attachment 333152
  --> https://bugs.webkit.org/attachment.cgi?id=333152
Patch

I confirmed this patch works on the wincairo build but the Bot status was
failure on wincairo.

If we take care of clang users on windows, for example, the part will be as
follows.
(In this case, supposing VisualStudio 2017 and Clang/C2 are used.)
Please give me your comment.

#if defined(WIN32) || defined(_WIN32)
#if (_MSC_VER > 1900) && (__c2__)
template<typename T> inline WKRetainPtr<T> adoptWK(T)
__attribute__((warn_unused_result));
#else
template<typename T> inline WKRetainPtr<T> adoptWK(T) _Check_return_;
#endif
#else
template<typename T> inline WKRetainPtr<T> adoptWK(T)
__attribute__((warn_unused_result));
#endif


More information about the webkit-reviews mailing list