From 0acaa795b3f5e7f2d00c9adbcbf1a766ea179d64 Mon Sep 17 00:00:00 2001 From: Xiaokang Qian Date: Wed, 11 Mar 2020 05:37:24 +0000 Subject: [PATCH] Fix the compile error once enabled Werror On 32 bit operating system,size_t is defined as unsigned int, this is the return type of strlen(), but it isn't aligned with the %ld, when compiling, warning will be reported. Change the type to %zu to avoid the warning. Change-Id: I2943d0dfba88ef42892f14230242008473d6263b Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/11325) --- test/cmp_ctx_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cmp_ctx_test.c b/test/cmp_ctx_test.c index 903e204622..fa4ef911bf 100644 --- a/test/cmp_ctx_test.c +++ b/test/cmp_ctx_test.c @@ -118,7 +118,7 @@ static int msg_total_size_log_cb(const char *func, const char *file, int line, OSSL_CMP_severity level, const char *msg) { msg_total_size += strlen(msg); - TEST_note("total=%d len=%ld msg='%s'\n", msg_total_size, strlen(msg), msg); + TEST_note("total=%d len=%zu msg='%s'\n", msg_total_size, strlen(msg), msg); return 1; } -- 2.25.1