Bug 150173

Summary: [WK2] Simplify unused return warning in WKRetainPtr.h
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: New BugsAssignee: Csaba Osztrogonác <ossy>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, mitz, ossy
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.