RESOLVED FIXED 206238
[WTF] Remove MediaTime.cpp test warning in GCC
https://bugs.webkit.org/show_bug.cgi?id=206238
Summary [WTF] Remove MediaTime.cpp test warning in GCC
Alicia Boya García
Reported 2020-01-14 09:02:27 PST
GCC emits warnings when it finds clang pragmas, so I'm wrapping them in #ifdef __clang__ to reduce the noise.
Attachments
Patch (1.46 KB, patch)
2020-01-14 09:05 PST, Alicia Boya García
no flags
Patch (1.47 KB, patch)
2020-01-14 10:15 PST, Alicia Boya García
no flags
Alicia Boya García
Comment 1 2020-01-14 09:05:31 PST
Charlie Turner
Comment 2 2020-01-14 09:35:07 PST
I think the macros in Compiler.h (IGNORE_*) should be used/modified for these sorts of checks, they have logic to check for compiler support and probably other gotchas.
Alicia Boya García
Comment 3 2020-01-14 10:11:58 PST
(In reply to Charlie Turner from comment #2) > I think the macros in Compiler.h (IGNORE_*) should be used/modified for > these sorts of checks, they have logic to check for compiler support and > probably other gotchas. Thing is, these macros are made to ignore warnings in certain compilers. This code on the other hand is intended to turn a specific, disabled by default warning, into an error in clang. This specific warning is also only supported by clang. And since that code uses clang pragmas, GCC shows a warning, which now I'm trying to avoid. From a glance at Compiler.h I don't see how they could be used for this case. I could use `#if COMPILER(clang)` instead of `#ifdef __clang__` though.
Alicia Boya García
Comment 4 2020-01-14 10:15:09 PST
WebKit Commit Bot
Comment 5 2020-01-15 03:45:55 PST
Comment on attachment 387671 [details] Patch Clearing flags on attachment: 387671 Committed r254563: <https://trac.webkit.org/changeset/254563>
WebKit Commit Bot
Comment 6 2020-01-15 03:45:56 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2020-01-15 03:46:21 PST
Note You need to log in before you can comment on or make changes to this bug.