[PATCH 2/2] trace-cmd lib: Use proper printf format specifiers

[email protected]
Newsgroups org.kernel.vger.linux-trace-devel
Message-ID <[email protected]>
From: Jaroslav Jindrak <[email protected]>

One of the warnings in out_write_cpu_data() printfs two
unsigned long long values as signed long long:

	tracecmd_warning("did not match size of %lld to %lld",
			 read_size, data_files[i].file_size);

This can lead to misleading values in a warning:

libtracecmd: Invalid argument
  did not match size of 3451486208 to -843481088

Signed-off-by: Jaroslav Jindrak <[email protected]>
---
 lib/trace-cmd/trace-output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/trace-cmd/trace-output.c b/lib/trace-cmd/trace-output.c
index 731f08dd..7b4b4b49 100644
--- a/lib/trace-cmd/trace-output.c
+++ b/lib/trace-cmd/trace-output.c
@@ -2683,7 +2683,7 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle,
 
 			if (read_size != data_files[i].file_size) {
 				errno = EINVAL;
-				tracecmd_warning("did not match size of %lld to %lld",
+				tracecmd_warning("did not match size of %llu to %llu",
 						 read_size, data_files[i].file_size);
 				goto out_free;
 			}
-- 
2.37.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.