Bug 232360 - [WebKit] Enable -Wformat=2 warnings
Summary: [WebKit] Enable -Wformat=2 warnings
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
Keywords: InRadar
Depends on:
Reported: 2021-10-26 19:31 PDT by David Kilzer (:ddkilzer)
Modified: 2021-10-27 18:44 PDT (History)
8 users (show)

See Also:

Patch v1 (19.75 KB, patch)
2021-10-26 19:50 PDT, David Kilzer (:ddkilzer)
darin: review+
Details | Formatted Diff | Diff
Patch for landing (20.26 KB, patch)
2021-10-27 18:01 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2021-10-26 19:31:30 PDT
Enable -Wformat=2 warnings in the WebKit project.

This includes -Wformat-nonliteral among other warnings.

Comment 1 David Kilzer (:ddkilzer) 2021-10-26 19:50:09 PDT
Created attachment 442559 [details]
Patch v1
Comment 2 Darin Adler 2021-10-27 16:02:03 PDT
Comment on attachment 442559 [details]
Patch v1

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

> Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:98
> +    NSString *const format = @"Experimental%@";

Consider constexpr.

> Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:100
> +    NSString *const format = @"WebKitExperimental%@";

Consider constexpr.

> Source/WebKit/WebAuthnProcess/mac/WebAuthnProcessMac.mm:56
>      _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), _kLSDisplayNameKey, (CFStringRef)applicationName, nullptr);

Comment 3 David Kilzer (:ddkilzer) 2021-10-27 18:01:31 PDT
Applying all of these changes.  Thanks!
Comment 4 David Kilzer (:ddkilzer) 2021-10-27 18:01:41 PDT
Created attachment 442659 [details]
Patch for landing
Comment 5 David Kilzer (:ddkilzer) 2021-10-27 18:09:43 PDT
Comment on attachment 442659 [details]
Patch for landing

Marking cq+ since "Patch v1" passed, and this doesn't include any substantive changes.
Comment 6 EWS 2021-10-27 18:44:27 PDT
Committed r284968 (243619@main): <https://commits.webkit.org/243619@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442659 [details].