Bug 179729 - [Cairo] Clang warns about mismatched declaration type tag for GraphicsContextState
Summary: [Cairo] Clang warns about mismatched declaration type tag for GraphicsContext...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-15 06:34 PST by Adrian Perez
Modified: 2017-11-15 12:06 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.36 KB, patch)
2017-11-15 06:36 PST, Adrian Perez
no flags Details | Formatted Diff | Diff
Patch (1.41 KB, patch)
2017-11-15 07:45 PST, Adrian Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2017-11-15 06:34:19 PST
The warning itself should be harmless, but it pops a few times during compilation
and we would rather have build output as clean as possible. Warning message follows.

---

In file included from DerivedSources/WebCore/unified-sources/UnifiedSource332.cpp:2:
In file included from ../../Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:34:
../../Source/WebCore/platform/graphics/cairo/CairoOperations.h:51:1: warning: class 'GraphicsContextState' was previously declared as a struct [-Wmismatched-tags]
class GraphicsContextState;
^
../../Source/WebCore/platform/graphics/GraphicsContext.h:116:8: note: previous use is here
struct GraphicsContextState {
       ^
../../Source/WebCore/platform/graphics/cairo/CairoOperations.h:51:1: note: did you mean struct here?
class GraphicsContextState;
^~~~~
struct
Comment 1 Adrian Perez 2017-11-15 06:36:37 PST
Created attachment 326980 [details]
Patch
Comment 2 Michael Catanzaro 2017-11-15 07:39:24 PST
Comment on attachment 326980 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=326980&action=review

> Source/WebCore/platform/graphics/cairo/CairoOperations.h:51
> +struct GraphicsContextState;

I think it should follow the class declarations, with a blank line in between.
Comment 3 Adrian Perez 2017-11-15 07:44:02 PST
(In reply to Michael Catanzaro from comment #2)
> Comment on attachment 326980 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=326980&action=review
> 
> > Source/WebCore/platform/graphics/cairo/CairoOperations.h:51
> > +struct GraphicsContextState;
> 
> I think it should follow the class declarations, with a blank line in
> between.


TBH, I was surprised that the style checker didn't complain now
that there's both “class” and “struct” mixed in a block of forward
declarations. Let's try your suggestion and see whether it will
complain or accept it ;-)
Comment 4 Adrian Perez 2017-11-15 07:45:22 PST
Created attachment 326983 [details]
Patch
Comment 5 WebKit Commit Bot 2017-11-15 10:06:09 PST
Comment on attachment 326983 [details]
Patch

Clearing flags on attachment: 326983

Committed r224882: <https://trac.webkit.org/changeset/224882>
Comment 6 WebKit Commit Bot 2017-11-15 10:06:10 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2017-11-15 12:06:10 PST
<rdar://problem/35566940>