Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SHA2.swift] warning: default will never be executed #872

Closed
wants to merge 1 commit into from

Conversation

aiden-leong
Copy link

remove exhausted default case

Copy link
Owner

@krzyzanowskim krzyzanowskim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version 12.5 report warning without default cases.

@@ -316,8 +316,6 @@ extension SHA2: Updatable {
self.process32(block: chunk, currentHash: &self.accumulatedHash32)
case .sha384, .sha512:
self.process64(block: chunk, currentHash: &self.accumulatedHash64)
@unknown default:
preconditionFailure()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2021-06-18 at 11 58 00

It doesn't look right. It is needed to silence the warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants