From 33a8d680d3708a3f5c8c277762d2e07d4d8ec30e Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Wed, 9 Sep 2020 19:32:23 -0700 Subject: [PATCH] Fix warnings. --- SecretAgentKit/SocketController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SecretAgentKit/SocketController.swift b/SecretAgentKit/SocketController.swift index 7b6a14b..f477bb9 100644 --- a/SecretAgentKit/SocketController.swift +++ b/SecretAgentKit/SocketController.swift @@ -33,7 +33,7 @@ public class SocketController { addr.sun_family = sa_family_t(AF_UNIX) var len: Int = 0 - _ = withUnsafeMutablePointer(to: &addr.sun_path.0) { pointer in + withUnsafeMutablePointer(to: &addr.sun_path.0) { pointer in path.withCString { cstring in len = strlen(cstring) strncpy(pointer, cstring, len) @@ -42,7 +42,7 @@ public class SocketController { addr.sun_len = UInt8(len+2) var data: Data! - _ = withUnsafePointer(to: &addr) { pointer in + withUnsafePointer(to: &addr) { pointer in data = Data(bytes: pointer, count: MemoryLayout.size) }