Bug 214599 - WebKit::UserData::decode() and encode() do not need a default: case
Summary: WebKit::UserData::decode() and encode() do not need a default: case
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-21 09:58 PDT by David Kilzer (:ddkilzer)
Modified: 2020-07-21 12:46 PDT (History)
2 users (show)

See Also:


Attachments
Patch v1 (12.88 KB, patch)
2020-07-21 10:02 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-07-21 09:58:10 PDT
WebKit::UserData::decode() and encode() do not need a default: case.

This prevents compiler warnings if a new enum is ever added to EncodedDataType.

<rdar://problem/65777928>
Comment 1 David Kilzer (:ddkilzer) 2020-07-21 10:02:29 PDT
Created attachment 404829 [details]
Patch v1
Comment 2 David Kilzer (:ddkilzer) 2020-07-21 12:46:37 PDT
Heh...didn't realize how many "missing" values there were:

In file included from /Volumes/Data/worker/iOS-13-Build-EWS/build/WebKitBuild/Release-iphoneos/DerivedSources/WebKit2/unified-sources/UnifiedSource23.cpp:4:
/Volumes/Data/worker/iOS-13-Build-EWS/build/Source/WebKit/Shared/UserData.cpp:171:20: error: 111 enumeration values not handled in switch: 'Null', 'AuthenticationChallenge', 'AuthenticationDecisionListener'... [-Werror,-Wswitch]
    switch (object.type()) {
                   ^
/Volumes/Data/worker/iOS-13-Build-EWS/build/Source/WebKit/Shared/UserData.cpp:171:20: note: add missing switch cases
    switch (object.type()) {
                   ^
/Volumes/Data/worker/iOS-13-Build-EWS/build/Source/WebKit/Shared/UserData.cpp:342:13: error: 110 enumeration values not handled in switch: 'AuthenticationChallenge', 'AuthenticationDecisionListener', 'Connection'... [-Werror,-Wswitch]

Don't need to fix this.