From 25a45eb6f83fac264d2ee476ac710938f5ce6ff9 Mon Sep 17 00:00:00 2001 From: Fabiano Fidêncio Date: Thu, 17 Sep 2015 14:30:41 +0200 Subject: tests: Fix warning about expected format for printf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /home/ffidenci/src/upstream/libssh/tests/benchmarks/bench_scp.c: In function ‘benchmarks_scp_down’: /home/ffidenci/src/upstream/libssh/tests/benchmarks/bench_scp.c:112:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf("Only %d bytes available (on %lu requested).\n",size,bytes); ^ /home/ffidenci/src/upstream/libssh/tests/benchmarks/bench_scp.c:116:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf("File is %d bytes (on %lu requested). Will cut the end\n" ,size,bytes); Signed-off-by: Fabiano Fidêncio --- tests/benchmarks/bench_scp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/benchmarks/bench_scp.c b/tests/benchmarks/bench_scp.c index 340637ba..71aba285 100644 --- a/tests/benchmarks/bench_scp.c +++ b/tests/benchmarks/bench_scp.c @@ -109,11 +109,11 @@ int benchmarks_scp_down (ssh_session session, struct argument_s *args, if(r == SSH_SCP_REQUEST_NEWFILE){ size=ssh_scp_request_get_size(scp); if(bytes > size){ - printf("Only %d bytes available (on %lu requested).\n",size,bytes); + printf("Only %zd bytes available (on %lu requested).\n",size,bytes); bytes = size; } if(size > bytes){ - printf("File is %d bytes (on %lu requested). Will cut the end\n",size,bytes); + printf("File is %zd bytes (on %lu requested). Will cut the end\n",size,bytes); } if(args->verbose>0) fprintf(stdout,"Starting download of %lu bytes now\n",bytes); -- cgit