mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-04-10 17:47:19 +00:00
Fix warnings.
This commit is contained in:
parent
1019f9a9c3
commit
33a8d680d3
@ -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<sockaddr_un>.size)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user