RESOLVED FIXED 207309
[Cairo] Do not use old-style GNU field initializers
https://bugs.webkit.org/show_bug.cgi?id=207309
Summary [Cairo] Do not use old-style GNU field initializers
Adrian Perez
Reported 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.
Attachments
Patch (2.36 KB, patch)
2020-02-05 16:38 PST, Adrian Perez
no flags
Adrian Perez
Comment 1 2020-02-05 16:38:57 PST
WebKit Commit Bot
Comment 2 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>
WebKit Commit Bot
Comment 3 2020-02-06 00:47:45 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 4 2020-02-06 00:48:13 PST
Note You need to log in before you can comment on or make changes to this bug.