RESOLVED FIXED 210225
Add curly braces after one line if statement for the case when we aren't using the internal SDK
https://bugs.webkit.org/show_bug.cgi?id=210225
Summary Add curly braces after one line if statement for the case when we aren't usin...
Kate Cheney
Reported 2020-04-08 16:45:37 PDT
If there are no braces and WEBSITE_DATA_STORE_ADDITIONS is empty, this if-statement includes the following line, causing test failures.
Attachments
Patch (1.62 KB, patch)
2020-04-08 16:48 PDT, Kate Cheney
no flags
Radar WebKit Bug Importer
Comment 1 2020-04-08 16:46:39 PDT
Kate Cheney
Comment 2 2020-04-08 16:48:16 PDT
David Kilzer (:ddkilzer)
Comment 3 2020-04-08 16:57:11 PDT
Comment on attachment 395887 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=395887&action=review r=me to fix tests, even though this is technically a style violation. > Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:430 > WEBSITE_DATA_STORE_ADDITIONS Eventually, the `WEBSITE_DATA_STORE_ADDITIONS` macro should probably have a do { ... } while(0) loop around its contents if it's multi-line, and maybe defined to `(void)0` if it is not set (in this file. Then the curly braces can be removed.
David Kilzer (:ddkilzer)
Comment 4 2020-04-08 17:00:25 PDT
Comment on attachment 395887 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=395887&action=review >> Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:430 >> WEBSITE_DATA_STORE_ADDITIONS > > Eventually, the `WEBSITE_DATA_STORE_ADDITIONS` macro should probably have a do { ... } while(0) loop around its contents if it's multi-line, and maybe defined to `(void)0` if it is not set (in this file. Then the curly braces can be removed. Another way to fix this is: #ifndef WEBSITE_DATA_STORE_ADDITIONS #define WEBSITE_DATA_STORE_ADDITIONS (void)0 #endif At the top of the file. Then you can remove the curly brances and make the style bot happy. r=me either way you decide to fix.
EWS
Comment 5 2020-04-08 17:20:19 PDT
Committed r259768: <https://trac.webkit.org/changeset/259768> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395887 [details].
Note You need to log in before you can comment on or make changes to this bug.