fix warnings on 32 bit builds
authorDr. Stephen Henson <steve@openssl.org>
Fri, 12 Feb 2016 22:24:39 +0000 (22:24 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sat, 13 Feb 2016 02:29:25 +0000 (02:29 +0000)
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
include/openssl/e_os2.h
test/dtlsv1listentest.c

index 04e1c05d8a6c858d36ad01f18180baa8e6cff4d4..519b8ce65ad1142e1f97b554a685ee702784b6db 100644 (file)
@@ -317,7 +317,11 @@ typedef unsigned __int64 uint64_t;
  * isn't available or did not define it, just go with hard-coded.
  */
 # ifndef PRIu64
-#  define PRIu64 "lu"
+#  ifdef SIXTY_FOUR_BIT_LONG
+#   define PRIu64 "lu"
+#  else
+#   define PRIu64 "llu"
+#  endif
 # endif
 
 /* ossl_inline: portable inline definition usable in public headers */
index d12d93a22f14d1adb945cd0211f805140772fb56..78ac83ab4a388b698dc124ef45904feb444abd1f 100644 (file)
@@ -377,7 +377,7 @@ int main(void)
     char *data;
     long datalen;
     int ret, success = 0;
-    size_t i;
+    long i;
 
     ctx = SSL_CTX_new(DTLS_server_method());
     if (ctx == NULL || peer == NULL)
@@ -397,7 +397,7 @@ int main(void)
     SSL_set_wbio(ssl, outbio);
 
     success = 1;
-    for (i = 0; i < OSSL_NELEM(testpackets) && success; i++) {
+    for (i = 0; i < (long)OSSL_NELEM(testpackets) && success; i++) {
         inbio = BIO_new_mem_buf((char *)testpackets[i].in,
                                 testpackets[i].inlen);
         if (inbio == NULL) {