Bug 206238

Summary: [WTF] Remove MediaTime.cpp test warning in GCC
Product: WebKit Reporter: Alicia Boya García <aboya>
Component: Web Template FrameworkAssignee: Alicia Boya García <aboya>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, commit-queue, cturner, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Alicia Boya García 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.
Comment 1 Alicia Boya García 2020-01-14 09:05:31 PST
Created attachment 387662 [details]
Patch
Comment 2 Charlie Turner 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.
Comment 3 Alicia Boya García 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.
Comment 4 Alicia Boya García 2020-01-14 10:15:09 PST
Created attachment 387671 [details]
Patch
Comment 5 WebKit Commit Bot 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>
Comment 6 WebKit Commit Bot 2020-01-15 03:45:56 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2020-01-15 03:46:21 PST
<rdar://problem/58601295>