-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Minor warning fixes #931
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
Minor warning fixes #931
Conversation
- Replace interpolation with String(describing:)
- Set _Nonnull on _cf_uuid* function prototypes and replace unsafeBitCast() with withMemoryRebound()
- Remove unneeded constraints that are inferred.
- Remove unused value and unnecessary unsafeBitCast - Fix expression implicitly coerced from 'Any?' to Any
Foundation/CharacterSet.swift
Outdated
@@ -486,7 +486,7 @@ public struct CharacterSet : ReferenceConvertible, Equatable, Hashable, SetAlgeb | |||
|
|||
@_semantics("convertToObjectiveC") | |||
public func _bridgeToObjectiveC() -> NSCharacterSet { | |||
return unsafeBitCast(_wrapped, to: NSCharacterSet.self) | |||
return _wrapped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phausler did swift-corelibs-foundation get the new CharacterSet implementation yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parkera Is this the only outstanding issue with this PR? I can always revert this one change if so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave this one out for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ive reverted this change
@@ -75,7 +75,7 @@ extension Measurement where UnitType : Dimension { | |||
/// Add two measurements of the same Unit. | |||
/// - precondition: The `unit` of `lhs` and `rhs` must be `isEqual`. | |||
/// - returns: A measurement of value `lhs.value + rhs.value` and unit `lhs.unit`. | |||
public func +<UnitType : Unit>(lhs: Measurement<UnitType>, rhs: Measurement<UnitType>) -> Measurement<UnitType> { | |||
public func +<UnitType>(lhs: Measurement<UnitType>, rhs: Measurement<UnitType>) -> Measurement<UnitType> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we make these changes in the Swift overlay too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it was done as part of swiftlang/swift#8281
Foundation/NSKeyedArchiver.swift
Outdated
@@ -612,7 +612,7 @@ open class NSKeyedArchiver : NSCoder { | |||
|
|||
if _isContainer(object) { | |||
guard let codable = object as? NSCoding else { | |||
fatalError("Object \(object) does not conform to NSCoding") | |||
fatalError("Object \(String(describing:object)) does not conform to NSCoding") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit pick: space after the :
please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -11,7 +11,7 @@ | |||
/// Decorates types which are backed by a Foundation reference type. | |||
/// | |||
/// All `ReferenceConvertible` types are hashable, equatable, and provide description functions. | |||
public protocol ReferenceConvertible : CustomStringConvertible, CustomDebugStringConvertible, Hashable, Equatable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems obnoxious that this generates a warning, but ok.
@swift-ci test and merge |
I think the build failure was later fixed by a PR yesterday. @swift-ci test and merge |
Reduce the noise from excessive warnings. Most of these are based on the fixits emitted by the compiler