summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-08-02 13:55:39 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-08-02 14:18:33 +0200
commit2cc28f6dba839918744b3317a9a54115da216c1c (patch)
tree0bf22f010a1ba7f2bcdaa7184012398570874d82
parenta79ab9341311773f1f3dc912a2f5557602ee9daa (diff)
downloadcurl-2cc28f6dba839918744b3317a9a54115da216c1c.tar.gz
darwin: silence compiler warnings
With a clang pragma and three type fixes (this is cherry-picked from #1722 to see if the build works out fine)
-rw-r--r--lib/vtls/darwinssl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c
index b4b747ba4..c2200994f 100644
--- a/lib/vtls/darwinssl.c
+++ b/lib/vtls/darwinssl.c
@@ -32,6 +32,9 @@
#include "curl_base64.h"
#include "strtok.h"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wtautological-pointer-compare"
+
#ifdef USE_DARWINSSL
#ifdef HAVE_LIMITS_H
@@ -2033,7 +2036,8 @@ static CURLcode pkp_pin_peer_pubkey(struct Curl_easy *data,
const char *pinnedpubkey)
{ /* Scratch */
size_t pubkeylen, realpubkeylen, spkiHeaderLength = 24;
- unsigned char *pubkey = NULL, *realpubkey = NULL, *spkiHeader = NULL;
+ unsigned char *pubkey = NULL, *realpubkey = NULL;
+ const unsigned char *spkiHeader = NULL;
CFDataRef publicKeyBits = NULL;
/* Result is returned to caller */
@@ -2076,7 +2080,7 @@ static CURLcode pkp_pin_peer_pubkey(struct Curl_easy *data,
#endif /* DARWIN_SSL_PINNEDPUBKEY_V2 */
pubkeylen = CFDataGetLength(publicKeyBits);
- pubkey = CFDataGetBytePtr(publicKeyBits);
+ pubkey = (unsigned char *)CFDataGetBytePtr(publicKeyBits);
switch(pubkeylen) {
case 526:
@@ -2846,3 +2850,5 @@ static ssize_t darwinssl_recv(struct connectdata *conn,
}
#endif /* USE_DARWINSSL */
+
+#pragma clang diagnostic pop