Skip to content

Commit fe6928e

Browse files
[minor] Fixing some warnings (instacart#74)
1 parent 27bbc1b commit fe6928e

File tree

8 files changed

+12
-14
lines changed

8 files changed

+12
-14
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
osx_image: xcode9.4
1+
osx_image: xcode10.2
22
language: objective-c
33
env:
44
matrix:
55
- PLATFORM=iOS SDK=iphonesimulator SCHEME=TrueTime-iOS DESTINATION="platform=iOS Simulator,name=iPhone 6,OS=10.0"
66
- PLATFORM=Mac SDK=macosx SCHEME=TrueTime-Mac DESTINATION="platform=macOS"
77
- PLATFORM=tvOS SDK=appletvsimulator SCHEME=TrueTime-tvOS DESTINATION="platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0"
8-
install:
8+
install:
99
- brew remove swiftlint --force || true
1010
- brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/8d6cbc8/Formula/swiftlint.rb
1111
- brew remove carthage --force || true

Sources/HostResolver.swift

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ final class HostResolver {
2929
/// - parameter callbackQueue: queue to fire `onComplete` callback
3030
/// - parameter onComplete: invoked upon first successfully resolved host
3131
/// or when all hosts fail
32-
// swiftlint:disable:next function_parameter_count
3332
static func resolve(hosts: [(host: String, port: Int)],
3433
timeout: TimeInterval,
3534
logger: LogCallback?,

Sources/NTPConnection.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ private extension NTPConnection {
243243
return
244244
}
245245

246-
let packet = data.withUnsafeBytes { $0.pointee as ntp_packet_t }.nativeEndian
246+
let packet = data.withUnsafeBytes { $0.load(as: ntp_packet_t.self) }.nativeEndian
247247
let responseTime = startTime.milliseconds + (responseTicks.milliseconds -
248248
requestTicks.milliseconds)
249249

Sources/SocketAddress.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ extension SocketAddress: CustomStringConvertible {
5959
}
6060

6161
extension SocketAddress: Hashable {
62-
var hashValue: Int {
63-
return host.hashValue
62+
func hash(into hasher: inout Hasher) {
63+
hasher.combine(host.hashValue)
6464
}
6565
}
6666

TrueTime.xcodeproj/project.pbxproj

+4-1
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@
639639
isa = PBXProject;
640640
attributes = {
641641
LastSwiftUpdateCheck = 0730;
642-
LastUpgradeCheck = 0900;
642+
LastUpgradeCheck = 1020;
643643
ORGANIZATIONNAME = Instacart;
644644
TargetAttributes = {
645645
280090491D444B64004C788E = {
@@ -1033,6 +1033,7 @@
10331033
CLANG_WARN_COMMA = YES;
10341034
CLANG_WARN_INFINITE_RECURSION = YES;
10351035
CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION = YES;
1036+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
10361037
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
10371038
CLANG_WARN_STRICT_PROTOTYPES = YES;
10381039
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1065,6 +1066,7 @@
10651066
CLANG_WARN_COMMA = YES;
10661067
CLANG_WARN_INFINITE_RECURSION = YES;
10671068
CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION = YES;
1069+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
10681070
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
10691071
CLANG_WARN_STRICT_PROTOTYPES = YES;
10701072
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1077,6 +1079,7 @@
10771079
MACOSX_DEPLOYMENT_TARGET = 10.10;
10781080
MTL_ENABLE_DEBUG_INFO = NO;
10791081
SDKROOT = "";
1082+
SWIFT_COMPILATION_MODE = wholemodule;
10801083
SWIFT_INSTALL_OBJC_HEADER = NO;
10811084
SWIFT_OBJC_BRIDGING_HEADER = "";
10821085
SWIFT_VERSION = 5.0;

TrueTime.xcodeproj/xcshareddata/xcschemes/TrueTime-Mac.xcscheme

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -40,7 +40,6 @@
4040
buildConfiguration = "Debug"
4141
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4242
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43-
language = ""
4443
shouldUseLaunchSchemeArgsEnv = "YES">
4544
<Testables>
4645
<TestableReference
@@ -70,7 +69,6 @@
7069
buildConfiguration = "Debug"
7170
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
7271
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
73-
language = ""
7472
launchStyle = "0"
7573
useCustomWorkingDirectory = "NO"
7674
ignoresPersistentStateOnLaunch = "NO"

TrueTime.xcodeproj/xcshareddata/xcschemes/TrueTime-iOS.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

TrueTime.xcodeproj/xcshareddata/xcschemes/TrueTime-tvOS.xcscheme

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
<TestableReference
@@ -56,7 +55,6 @@
5655
buildConfiguration = "Debug"
5756
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5857
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59-
language = ""
6058
launchStyle = "0"
6159
useCustomWorkingDirectory = "NO"
6260
ignoresPersistentStateOnLaunch = "NO"

0 commit comments

Comments
 (0)