Summary: | Fix -Wattributes warning spam | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||||
Component: | WebKit2 | Assignee: | Michael Catanzaro <mcatanzaro> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ap, benjamin, cdumez, cmarcelo, commit-queue, darin, dbates, mcatanzaro, thorton | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | PC | ||||||||
OS: | Linux | ||||||||
Attachments: |
|
Description
Michael Catanzaro
2017-03-06 18:41:26 PST
Created attachment 303600 [details]
Patch
Comment on attachment 303600 [details]
Patch
Don’t import wtf headers from WebKit2 framework headers. Instead, you can define WK_UNAVAILABLE in WKDeclarationSpecifiers.h.
(In reply to comment #2) > Comment on attachment 303600 [details] > Patch > > Don’t import wtf headers from WebKit2 framework headers. Umm yeah, that was dumb, oops. This failure is surprising, given that NS_UNAVAILAbLE is defined in macOS like this: /* * only certain compilers support __attribute__((unavailable)) */ #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) #define UNAVAILABLE_ATTRIBUTE __attribute__((unavailable)) #else #define UNAVAILABLE_ATTRIBUTE #endif #if !defined(NS_UNAVAILABLE) #define NS_UNAVAILABLE UNAVAILABLE_ATTRIBUTE #endif Weird. I have absolutely no clue; maybe it used to exist but was removed (very unlikely), maybe Apple has its own fork of GCC where it added that attribute (seems unlikely too), maybe you don't care about GCC and the check is really just there for Clang (also seems unlikely)... I don't know! It's not documented anywhere and it definitely does not work. Created attachment 303703 [details]
Patch
Let's see if EWS likes this. Note: __has_extension is guaranteed to be defined where I removed the check for it; that's a drive-by cleanup. Comment on attachment 303703 [details]
Patch
Thanks!
Comment on attachment 303703 [details] Patch Clearing flags on attachment: 303703 Committed r213620: <http://trac.webkit.org/changeset/213620> All reviewed patches have been landed. Closing bug. |