diff options
author | Matt Caswell <matt@openssl.org> | 2023-06-30 16:40:41 +0100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-07-06 12:55:21 +1000 |
commit | 0cea6df239fc5c5c5902b4c660305bf953f03eb1 (patch) | |
tree | b035ba70bc90dc9eaae4bb02ee86aff4685b2759 | |
parent | 1a2a0e1dc88bf905a7997e12de08a4b45f9db53c (diff) |
Use %llx not %lx for uint64_t
Some compilers don't like %lx
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21332)
-rw-r--r-- | ssl/quic/quic_trace.c | 7 | ||||
-rw-r--r-- | test/quic_cc_test.c | 6 | ||||
-rw-r--r-- | test/quic_multistream_test.c | 3 |
3 files changed, 10 insertions, 6 deletions
diff --git a/ssl/quic/quic_trace.c b/ssl/quic/quic_trace.c index 34ee65ad95..ed25e05ee3 100644 --- a/ssl/quic/quic_trace.c +++ b/ssl/quic/quic_trace.c @@ -355,7 +355,7 @@ static int frame_path_challenge(BIO *bio, PACKET *pkt) if (!ossl_quic_wire_decode_frame_path_challenge(pkt, &data)) return 0; - BIO_printf(bio, " Data: %016lx\n", data); + BIO_printf(bio, " Data: %016llx\n", (unsigned long long)data); return 1; } @@ -367,7 +367,7 @@ static int frame_path_response(BIO *bio, PACKET *pkt) if (!ossl_quic_wire_decode_frame_path_response(pkt, &data)) return 0; - BIO_printf(bio, " Data: %016lx\n", data); + BIO_printf(bio, " Data: %016llx\n", (unsigned long long)data); return 1; } @@ -588,7 +588,8 @@ int ossl_quic_trace(int write_p, int version, int content_type, BIO_puts(bio, " Packet\n"); BIO_printf(bio, " Packet Type: %s\n", packet_type(hdr.type)); if (hdr.type != QUIC_PKT_TYPE_1RTT) - BIO_printf(bio, " Version: 0x%08x\n", hdr.version); + BIO_printf(bio, " Version: 0x%08lx\n", + (unsigned long)hdr.version); BIO_puts(bio, " Destination Conn Id: "); put_conn_id(bio, &hdr.dst_conn_id); BIO_puts(bio, "\n"); diff --git a/test/quic_cc_test.c b/test/quic_cc_test.c index a6b45e3ed6..67ab38f28a 100644 --- a/test/quic_cc_test.c +++ b/test/quic_cc_test.c @@ -444,8 +444,10 @@ static int test_simulate(void) double error = ((double)estimated_capacity / (double)actual_capacity) - 1.0; - TEST_info("est = %6lu kB/s, act=%6lu kB/s (error=%.02f%%)\n", - estimated_capacity, actual_capacity, error * 100.0); + TEST_info("est = %6llu kB/s, act=%6llu kB/s (error=%.02f%%)\n", + (unsigned long long)estimated_capacity, + (unsigned long long)actual_capacity, + error * 100.0); /* Max 5% error */ if (!TEST_double_le(error, 0.05)) diff --git a/test/quic_multistream_test.c b/test/quic_multistream_test.c index 128d169f76..7091266c11 100644 --- a/test/quic_multistream_test.c +++ b/test/quic_multistream_test.c @@ -747,7 +747,8 @@ static int run_script_worker(struct helper *h, const struct script_op *script, break; default: - TEST_error("opcode %d not allowed on child thread", op->op); + TEST_error("opcode %lu not allowed on child thread", + (unsigned long)op->op); goto out; } } |