Bug 232360

Summary: [WebKit] Enable -Wformat=2 warnings
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebKit2Assignee: David Kilzer (:ddkilzer) <ddkilzer>
Severity: Normal CC: bfulgham, darin, ews-watchlist, hi, joepeck, kkinnunen, pangle, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch v1
darin: review+
Patch for landing none

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].