Bug 217791 - PDFPlugin.mm:2303:139: error: type 'SEL _Nullable' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
Summary: PDFPlugin.mm:2303:139: error: type 'SEL _Nullable' cannot be narrowed to 'boo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: PDF (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-15 15:53 PDT by David Kilzer (:ddkilzer)
Modified: 2020-10-15 17:06 PDT (History)
3 users (show)

See Also:


Attachments
Patch v1 (1.74 KB, patch)
2020-10-15 15:56 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) 2020-10-15 15:53:44 PDT
Issue found by open source clang:

In file included from WebKitBuild/Release/DerivedSources/WebKit2/unified-sources/UnifiedSource55-mm.mm:3:
Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:2303:139: error: type 'SEL _Nullable' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
        PDFContextMenuItem menuItem { String([item title]), !![item isEnabled], !![item isSeparatorItem], static_cast<int>([item state]), [item action], i };
                                                                                                                                          ^~~~~~~~~~~~~
Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:2303:139: note: insert an explicit cast to silence this issue
        PDFContextMenuItem menuItem { String([item title]), !![item isEnabled], !![item isSeparatorItem], static_cast<int>([item state]), [item action], i };
                                                                                                                                          ^~~~~~~~~~~~~
                                                                                                                                          static_cast<bool>( )

<rdar://problem/70349804>
Comment 1 David Kilzer (:ddkilzer) 2020-10-15 15:56:49 PDT
Created attachment 411502 [details]
Patch v1
Comment 2 EWS 2020-10-15 17:06:21 PDT
Committed r268562: <https://trac.webkit.org/changeset/268562>

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