From: Tomas Krizek Date: Mon, 21 Jun 2021 12:51:28 +0000 (+0200) Subject: printf: use platform independent length modifiers X-Git-Tag: v5.4.0~9^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d186a90173a03bda92ca04ed3af25e028b0aef85;p=thirdparty%2Fknot-resolver.git printf: use platform independent length modifiers Make sure we use the correct lemgth modifiers to support both 32b and 64b architectures. --- diff --git a/daemon/http.c b/daemon/http.c index 3055f3d0c..e21b0db14 100644 --- a/daemon/http.c +++ b/daemon/http.c @@ -331,7 +331,7 @@ static int header_callback(nghttp2_session *h2, const nghttp2_frame *frame, /* Limit maximum value size to reduce attack surface. */ if (valuelen > HTTP_MAX_HEADER_IN_SIZE) { kr_log_verbose( - "[http] stream %d: header too large (%ld B), refused\n", + "[http] stream %d: header too large (%zu B), refused\n", stream_id, valuelen); refuse_stream(h2, stream_id); return 0; diff --git a/tests/pytests/proxy/tls-proxy.h b/tests/pytests/proxy/tls-proxy.h index c6f468d49..2dbd9fd81 100644 --- a/tests/pytests/proxy/tls-proxy.h +++ b/tests/pytests/proxy/tls-proxy.h @@ -1,6 +1,8 @@ #pragma once /* SPDX-License-Identifier: GPL-3.0-or-later */ +#define __STDC_FORMAT_MACROS +#include #include #include #include diff --git a/tests/pytests/proxy/tlsproxy.c b/tests/pytests/proxy/tlsproxy.c index f1b4acc2f..bcdffb03d 100644 --- a/tests/pytests/proxy/tlsproxy.c +++ b/tests/pytests/proxy/tlsproxy.c @@ -25,7 +25,7 @@ void help(char *argv[], struct args *a) " -t, --cert=[path] Path to certificate file (default: %s).\n" " -k, --key=[path] Path to key file (default: %s).\n" " -c, --close=[N] Close connection to client after\n" - " every N ms (default: %li).\n" + " every N ms (default: %" PRIu64 ").\n" " -f, --fail=[N] Delay every Nth incoming connection by 10 sec,\n" " 0 disables delaying (default: 0).\n" " -r, --rehandshake Do TLS rehandshake after every 8 bytes\n"