apps/*.c: switch to platform-neutral format modifiers in BIO_print calls.
authorAndy Polyakov <appro@openssl.org>
Wed, 29 Mar 2017 21:23:56 +0000 (23:23 +0200)
committerAndy Polyakov <appro@openssl.org>
Thu, 30 Mar 2017 17:34:18 +0000 (19:34 +0200)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3083)

apps/enc.c
apps/s_cb.c
apps/s_client.c

index 30c3c6329e9e41a5520c5f726cc1f401aad1d09c..a1b2b3cac8a1d8b82981754fa8fb4f8cb6f8c5e1 100644 (file)
@@ -548,8 +548,8 @@ int enc_main(int argc, char **argv)
 
     ret = 0;
     if (verbose) {
-        BIO_printf(bio_err, "bytes read   :%8"PRIu64"\n", BIO_number_read(in));
-        BIO_printf(bio_err, "bytes written:%8"PRIu64"\n", BIO_number_written(out));
+        BIO_printf(bio_err, "bytes read   :%8ju\n", BIO_number_read(in));
+        BIO_printf(bio_err, "bytes written:%8ju\n", BIO_number_written(out));
     }
  end:
     ERR_print_errors(bio_err);
index 4400580119b633f241ca6199688d65da887de202..f395a2a278110603961be28c7bc63d237975367f 100644 (file)
@@ -1042,8 +1042,8 @@ static char *hexencode(const unsigned char *data, size_t len)
     int ilen = (int) outlen;
 
     if (outlen < len || ilen < 0 || outlen != (size_t)ilen) {
-        BIO_printf(bio_err, "%s: %" PRIu64 "-byte buffer too large to hexencode\n",
-                   opt_getprog(), (uint64_t)len);
+        BIO_printf(bio_err, "%s: %zu-byte buffer too large to hexencode\n",
+                   opt_getprog(), len);
         exit(1);
     }
     cp = out = app_malloc(ilen, "TLSA hex data buffer");
index fc18da282c67f854380a03d85b2dcd32b432cd8a..cab7e251de2a8c5fea25fb50d7849585454177cb 100644 (file)
@@ -2901,8 +2901,8 @@ static void print_stuff(BIO *bio, SSL *s, int full)
 #endif
 
         BIO_printf(bio,
-                   "---\nSSL handshake has read %" PRIu64
-                   " bytes and written %" PRIu64 " bytes\n",
+                   "---\nSSL handshake has read %ju bytes "
+                   "and written %ju bytes\n",
                    BIO_number_read(SSL_get_rbio(s)),
                    BIO_number_written(SSL_get_wbio(s)));
     }