[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 202/205: nss: fix MinGW compiler warnings
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 202/205: nss: fix MinGW compiler warnings |
Date: |
Thu, 20 Apr 2017 16:22:22 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.0
in repository gnurl.
commit a4ff8a1a0e1af742ac0a0f0eac45d9257678edd0
Author: Marcel Raad <address@hidden>
AuthorDate: Thu Apr 6 19:52:39 2017 +0200
nss: fix MinGW compiler warnings
This fixes 3 warnings issued by MinGW:
1. PR_ImportTCPSocket actually has a paramter of type PROsfd instead of
PRInt32, which is 64 bits on Windows. Fixed this by including the
corresponding header file instead of redeclaring the function, which is
supported even though it is in the private include folder. [1]
2. In 64-bit mode, size_t is 64 bits while CK_ULONG is 32 bits, so an
explicit
narrowing cast is needed.
3. Curl_timeleft returns time_t instead of long since commit
21aa32d30dbf319f2d336e0cb68d3a3235869fbb.
[1]
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_ImportTCPSocket
Closes https://github.com/curl/curl/pull/1393
---
lib/vtls/nss.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index 489851131..89a16d3fe 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -56,7 +56,8 @@
#include <base64.h>
#include <cert.h>
#include <prerror.h>
-#include <keyhi.h> /* for SECKEY_DestroyPublicKey() */
+#include <keyhi.h> /* for SECKEY_DestroyPublicKey() */
+#include <private/pprio.h> /* for PR_ImportTCPSocket */
#define NSSVERNUM ((NSS_VMAJOR<<16)|(NSS_VMINOR<<8)|NSS_VPATCH)
@@ -77,7 +78,6 @@
/* enough to fit the string "PEM Token #[0|1]" */
#define SLOTSIZE 13
-PRFileDesc *PR_ImportTCPSocket(PRInt32 osfd);
static PRLock *nss_initlock = NULL;
static PRLock *nss_crllock = NULL;
static PRLock *nss_findslot_lock = NULL;
@@ -401,7 +401,7 @@ static CURLcode nss_create_object(struct ssl_connect_data
*ssl,
PK11_SETATTRS(attrs, attr_cnt, CKA_CLASS, &obj_class, sizeof(obj_class));
PK11_SETATTRS(attrs, attr_cnt, CKA_TOKEN, &cktrue, sizeof(CK_BBOOL));
PK11_SETATTRS(attrs, attr_cnt, CKA_LABEL, (unsigned char *)filename,
- strlen(filename) + 1);
+ (CK_ULONG)strlen(filename) + 1);
if(CKO_CERTIFICATE == obj_class) {
CK_BBOOL *pval = (cacert) ? (&cktrue) : (&ckfalse);
@@ -1960,8 +1960,8 @@ static CURLcode nss_do_connect(struct connectdata *conn,
int sockindex)
/* check timeout situation */
- const long time_left = Curl_timeleft(data, NULL, TRUE);
- if(time_left < 0L) {
+ const time_t time_left = Curl_timeleft(data, NULL, TRUE);
+ if(time_left < 0) {
failf(data, "timed out before SSL handshake");
result = CURLE_OPERATION_TIMEDOUT;
goto error;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 170/205: sspi: print out InitializeSecurityContext() error message, (continued)
- [GNUnet-SVN] [gnurl] 170/205: sspi: print out InitializeSecurityContext() error message, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 180/205: RELEASE-NOTES: synced with f9d1e9a27f7e1, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 162/205: Revert "configure: prefer 'long long' to int64_t for curl_off_t", gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 166/205: system.h: set sizeof long to 4 on "default 32 bit" systems, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 195/205: configure.ac: ignore CR after version numbers, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 176/205: CURLINFO_SCHEME.3: fix variable type, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 193/205: unit1303: fix compiler warning, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 201/205: TLS: Fix switching off SSL session id when client cert is used, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 154/205: url: don't free postponed data on connection reuse, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 69/205: http_proxy: Ignore TE and CL in CONNECT 2xx responses, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 202/205: nss: fix MinGW compiler warnings,
gnunet <=
- [GNUnet-SVN] [gnurl] 159/205: configure: prefer 'long long' to int64_t for curl_off_t, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 197/205: code: fix typos and style in comments, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 149/205: docs: minor typo in write-out.d, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 181/205: nss: load CA certificates even with --insecure, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 186/205: Curl_expire_latest: ignore already expired timers, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 155/205: curl_sasl: declare mechtable static, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 150/205: easy: silence compiler warning, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 138/205: dist: add missing files to the tarball, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 204/205: THANKS: add contributors from 7.54.0 release notes, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 161/205: tool_operate: fix MinGW compiler warning, gnunet, 2017/04/20