From 99e07b6fab5ccdcb6fcf29332546baf73682d8b6 Mon Sep 17 00:00:00 2001 From: Razvan Cojocaru Date: Thu, 15 Dec 2022 19:45:32 +0200 Subject: [PATCH] Fix printf() argument type mismatch warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "format ‘%zu’ expects argument of type ‘size_t’, but argument 3 has type ‘int’ [-Wformat=]" --- libclamav/others_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libclamav/others_common.c b/libclamav/others_common.c index 83e2c2e89b..6f5d5deeb3 100644 --- a/libclamav/others_common.c +++ b/libclamav/others_common.c @@ -222,7 +222,7 @@ void *cli_malloc(size_t size) if (!size || size > CLI_MAX_ALLOCATION) { cli_warnmsg("cli_malloc(): File or section is too large to scan (%zu bytes). \ - For your safety, ClamAV limits how much memory an operation can allocate to %zu bytes\n", + For your safety, ClamAV limits how much memory an operation can allocate to %d bytes\n", size, CLI_MAX_ALLOCATION); return NULL; } @@ -243,7 +243,7 @@ void *cli_calloc(size_t nmemb, size_t size) if (!nmemb || !size || size > CLI_MAX_ALLOCATION || nmemb > CLI_MAX_ALLOCATION || (nmemb * size > CLI_MAX_ALLOCATION)) { cli_warnmsg("cli_calloc2(): File or section is too large to scan (%zu bytes). \ - For your safety, ClamAV limits how much memory an operation can allocate to %zu bytes\n", + For your safety, ClamAV limits how much memory an operation can allocate to %d bytes\n", size, CLI_MAX_ALLOCATION); return NULL; } @@ -264,7 +264,7 @@ void *cli_realloc(void *ptr, size_t size) if (!size || size > CLI_MAX_ALLOCATION) { cli_warnmsg("cli_realloc(): File or section is too large to scan (%zu bytes). \ - For your safety, ClamAV limits how much memory an operation can allocate to %zu bytes\n", + For your safety, ClamAV limits how much memory an operation can allocate to %d bytes\n", size, CLI_MAX_ALLOCATION); return NULL; } @@ -285,7 +285,7 @@ void *cli_realloc2(void *ptr, size_t size) if (!size || size > CLI_MAX_ALLOCATION) { cli_warnmsg("cli_realloc2(): File or section is too large to scan (%zu bytes). \ - For your safety, ClamAV limits how much memory an operation can allocate to %zu bytes\n", + For your safety, ClamAV limits how much memory an operation can allocate to %d bytes\n", size, CLI_MAX_ALLOCATION); return NULL; }