Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tools: Use %zd for size_t printf formats on 32-bit

A couple of trivial fixes for using %zd for size_t in the code
supporting the ZSTD compression library.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200820212501.24421-1-chris@chris-wilson.co.uk
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Chris Wilson and committed by
Arnaldo Carvalho de Melo
20befbb1 57ed6289

+2 -2
+1 -1
tools/perf/util/session.c
··· 87 87 session->decomp_last = decomp; 88 88 } 89 89 90 - pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size); 90 + pr_debug("decomp (B): %zd to %zd\n", src_size, decomp_size); 91 91 92 92 return 0; 93 93 }
+1 -1
tools/perf/util/zstd.c
··· 99 99 while (input.pos < input.size) { 100 100 ret = ZSTD_decompressStream(data->dstream, &output, &input); 101 101 if (ZSTD_isError(ret)) { 102 - pr_err("failed to decompress (B): %ld -> %ld, dst_size %ld : %s\n", 102 + pr_err("failed to decompress (B): %zd -> %zd, dst_size %zd : %s\n", 103 103 src_size, output.size, dst_size, ZSTD_getErrorName(ret)); 104 104 break; 105 105 }