Bug 150173 - [WK2] Simplify unused return warning in WKRetainPtr.h
Summary: [WK2] Simplify unused return warning in WKRetainPtr.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Csaba Osztrogonác
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-15 09:02 PDT by Csaba Osztrogonác
Modified: 2015-10-19 00:08 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.63 KB, patch)
2015-10-15 09:04 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
Patch (1.68 KB, patch)
2015-10-15 09:11 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2015-10-15 09:02:04 PDT
http://trac.webkit.org/changeset/159788/trunk/Source/WebKit2/UIProcess/API/cpp/WKRetainPtr.h
added (copy/pasted) a complex definition to do it without including Compiler.h from WTF.

But now WARN_UNUSED is defined to __attribute__((__warn_unused_result__))
if the compiler is GCC or Clang. But it is a WebKit2 file, I don't
know if any other compiler is supported.
http://trac.webkit.org/browser/trunk/Source/WTF/wtf/Compiler.h#L308

I think we can simply use __attribute__((__warn_unused_result__)) unconditionally.
Comment 1 Csaba Osztrogonác 2015-10-15 09:04:22 PDT
Created attachment 263163 [details]
Patch
Comment 2 Csaba Osztrogonác 2015-10-15 09:11:17 PDT
Created attachment 263164 [details]
Patch
Comment 3 Csaba Osztrogonác 2015-10-19 00:08:47 PDT
Comment on attachment 263164 [details]
Patch

Clearing flags on attachment: 263164

Committed r191279: <http://trac.webkit.org/changeset/191279>
Comment 4 Csaba Osztrogonác 2015-10-19 00:08:54 PDT
All reviewed patches have been landed.  Closing bug.