Skip to content

Commit 20befbb

Browse files
ickleacmel
authored andcommitted
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 <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexey Budankov <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 57ed628 commit 20befbb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/perf/util/session.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static int perf_session__process_compressed_event(struct perf_session *session,
8787
session->decomp_last = decomp;
8888
}
8989

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);
9191

9292
return 0;
9393
}

tools/perf/util/zstd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ size_t zstd_decompress_stream(struct zstd_data *data, void *src, size_t src_size
9999
while (input.pos < input.size) {
100100
ret = ZSTD_decompressStream(data->dstream, &output, &input);
101101
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",
103103
src_size, output.size, dst_size, ZSTD_getErrorName(ret));
104104
break;
105105
}

0 commit comments

Comments
 (0)