From: Xiaokang Qian Date: Wed, 11 Mar 2020 05:37:24 +0000 (+0000) Subject: Fix the compile error once enabled Werror X-Git-Tag: openssl-3.0.0-alpha1~248 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0acaa795b3f5e7f2d00c9adbcbf1a766ea179d64;p=oweals%2Fopenssl.git 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) --- 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; }