Bug 207309 - [Cairo] Do not use old-style GNU field initializers
Summary: [Cairo] Do not use old-style GNU field initializers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-05 16:36 PST by Adrian Perez
Modified: 2020-02-06 00:48 PST (History)
7 users (show)

See Also:


Attachments
Patch (2.36 KB, patch)
2020-02-05 16:38 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 2020-02-05 16:36:10 PST
Clang is already warning about using 

  struct foo value = { member: 42 };

instead the standard syntax for field initializers should be used:

  struct foo value = { .member = 42 };

Log of warnings generated by Clang follows.

---

../Source/WebCore/platform/graphics/cairo/GradientCairo.cpp:120:9: warning: use of GNU old-style field designator extension [-Wgnu-designator]                 
        x: cx + (r * cos(angleStart)),                                                                                                                         
        ^~                                                                                                                                                     
        .x =                                                                                                                                                   
../Source/WebCore/platform/graphics/cairo/GradientCairo.cpp:121:9: warning: use of GNU old-style field designator extension [-Wgnu-designator]                 
        y: cy + (r * sin(angleStart))                                                                                                                          
        ^~                                                                                                                                                     
        .y =                                                                                                                                                   
../Source/WebCore/platform/graphics/cairo/GradientCairo.cpp:124:9: warning: use of GNU old-style field designator extension [-Wgnu-designator]                 
        x: cx + (r * cos(angleStart)) - f * (r * sin(angleStart)),                                                                                             
        ^~                                                                                                                                                     
        .x =                                                                                                                                                   
../Source/WebCore/platform/graphics/cairo/GradientCairo.cpp:125:9: warning: use of GNU old-style field designator extension [-Wgnu-designator]                 
        y: cy + (r * sin(angleStart)) + f * (r * cos(angleStart))                                                                                              
        ^~                                                                                                                                                     
        .y =                                                                                                                                                   
../Source/WebCore/platform/graphics/cairo/GradientCairo.cpp:128:9: warning: use of GNU old-style field designator extension [-Wgnu-designator]                 
        x: cx + (r * cos(angleEnd)) + f * (r * sin(angleEnd)),                                                                                                 
        ^~                                                                                                                                                     
        .x =                                                                                                                                                   
../Source/WebCore/platform/graphics/cairo/GradientCairo.cpp:129:9: warning: use of GNU old-style field designator extension [-Wgnu-designator]                 
        y: cy + (r * sin(angleEnd)) - f * (r * cos(angleEnd))                                                                                                  
        ^~                                                                                                                                                     
        .y =                                                                   
../Source/WebCore/platform/graphics/cairo/GradientCairo.cpp:132:9: warning: use of GNU old-style field designator extension [-Wgnu-designator]                 
        x: cx + (r * cos(angleEnd)),
        ^~                                                                                                                                                     
        .x =                                                                                                                                                   
../Source/WebCore/platform/graphics/cairo/GradientCairo.cpp:133:9: warning: use of GNU old-style field designator extension [-Wgnu-designator]                 
        y: cy + (r * sin(angleEnd))                                                                                                                            
        ^~       
        .y = 
8 warnings generated.
Comment 1 Adrian Perez 2020-02-05 16:38:57 PST
Created attachment 389899 [details]
Patch
Comment 2 WebKit Commit Bot 2020-02-06 00:47:43 PST
Comment on attachment 389899 [details]
Patch

Clearing flags on attachment: 389899

Committed r255911: <https://trac.webkit.org/changeset/255911>
Comment 3 WebKit Commit Bot 2020-02-06 00:47:45 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2020-02-06 00:48:13 PST
<rdar://problem/59216924>