diff --git a/programs/cmp_tool.c b/programs/cmp_tool.c
index 8533d66317ab1b05a17d20dcef84e3aaff98b7bb..6abf0e95adb3b194851f17039e110d47716aae2d 100644
--- a/programs/cmp_tool.c
+++ b/programs/cmp_tool.c
@@ -541,8 +541,8 @@ int CMP_MAIN(int argc, char **argv)
 		if (size < 0)
 			goto fail;
 		if (size < (ssize_t)model_size) {
-			fprintf(stderr, "%s: %s: Error: The files do not contain enough data. Expected: 0x%x, has 0x%zx.\n",
-				PROGRAM_NAME, model_file_name, model_size, size);
+			fprintf(stderr, "%s: %s: Error: The files do not contain enough data. Expected: 0x%x, has 0x%x.\n",
+				PROGRAM_NAME, model_file_name, model_size, (uint32_t)size);
 			goto fail;
 		}
 		if (size != (ssize_t)model_size) {