From 6e375353ed99b794994b809570b217e3e732a44b Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 4 May 2022 13:31:58 +0200 Subject: [PATCH] Fix format specifier for printing size_t on 32bit size_t platforms Today even 32 bit platform generally use a 64bit size_t but Android armeabi-v7a is an expection to that and uses a 32bit size_t. Use z as correct specifier for a size_t. Clang complained about this: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] Signed-off-by: Arne Schwabe Acked-by: Gert Doering Message-Id: <20220504113158.1051861-1-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24277.html Signed-off-by: Gert Doering --- src/openvpn/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 092643619..5aaac1a98 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -2426,7 +2426,7 @@ get_frame_mtu(struct context *c, const struct options *o) if (mtu < TUN_MTU_MIN) { - msg(M_WARN, "TUN MTU value (%lu) must be at least %d", mtu, TUN_MTU_MIN); + msg(M_WARN, "TUN MTU value (%zu) must be at least %d", mtu, TUN_MTU_MIN); frame_print(&c->c2.frame, M_FATAL, "MTU is too small"); } return mtu; -- 2.47.2