From c4ea6129e87c371848e1319f2e110321f1d5f7ae Mon Sep 17 00:00:00 2001 From: Oliver Wiese <oliver.wiese@fu-berlin.de> Date: Fri, 3 Apr 2020 09:22:14 +0200 Subject: [PATCH] remove warnings --- enzevalos_iphone/CHelpers.swift | 2 +- enzevalos_iphone/c/general-helpers.c | 2 +- enzevalos_iphoneTests/CryptoTests.swift | 2 +- enzevalos_iphoneTests/GeneratedMocks.swift | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/enzevalos_iphone/CHelpers.swift b/enzevalos_iphone/CHelpers.swift index d79686e1..7a492ac9 100644 --- a/enzevalos_iphone/CHelpers.swift +++ b/enzevalos_iphone/CHelpers.swift @@ -14,7 +14,7 @@ import Foundation */ func createCStrArr(sarr: [String]) -> UnsafeMutablePointer<UnsafeMutablePointer<Int8>?>?{ let len = sarr.count - var carr = init_str_arr(Int32(len)) + let carr = init_str_arr(Int32(len)) for i in 0..<len { let str = sarr[i] diff --git a/enzevalos_iphone/c/general-helpers.c b/enzevalos_iphone/c/general-helpers.c index bc3c21df..8165cf45 100644 --- a/enzevalos_iphone/c/general-helpers.c +++ b/enzevalos_iphone/c/general-helpers.c @@ -68,7 +68,7 @@ char *bin_to_hex(unsigned char *bin, int len) char *res = malloc(2*len+1); for (int i =0;i<len;i++) { - sprintf(buf, "%02x", bin[i]); + sprintf((char*) buf, "%02x", bin[i]); res[i*2]=buf[0]; res[i*2+1]=buf[1]; } diff --git a/enzevalos_iphoneTests/CryptoTests.swift b/enzevalos_iphoneTests/CryptoTests.swift index 06cbf1c0..3b2d8597 100644 --- a/enzevalos_iphoneTests/CryptoTests.swift +++ b/enzevalos_iphoneTests/CryptoTests.swift @@ -630,7 +630,7 @@ class CryptoTests: XCTestCase { XCTFail("No signed data") return } - guard let publickey = pgp.loadKey(id: mail.firstKey!.keyID)?.publicKey, keys.count > 0 else { + guard let _ = pgp.loadKey(id: mail.firstKey!.keyID)?.publicKey, keys.count > 0 else { XCTFail("Can not load key") return } diff --git a/enzevalos_iphoneTests/GeneratedMocks.swift b/enzevalos_iphoneTests/GeneratedMocks.swift index f82a6cb7..3bd98d15 100644 --- a/enzevalos_iphoneTests/GeneratedMocks.swift +++ b/enzevalos_iphoneTests/GeneratedMocks.swift @@ -1,4 +1,4 @@ -// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationModel.swift at 2020-03-31 16:56:08 +0000 +// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationModel.swift at 2020-04-03 07:21:06 +0000 // // AuthenticationModel.swift @@ -653,7 +653,7 @@ import Foundation } -// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationViewModel.swift at 2020-03-31 16:56:08 +0000 +// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationViewModel.swift at 2020-04-03 07:21:06 +0000 // // AuthenticationViewModel.swift -- GitLab