summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabiano Fidêncio <fidencio@redhat.com>2015-09-17 14:30:41 +0200
committerFabiano Fidêncio <fidencio@redhat.com>2015-10-12 13:56:21 +0200
commit25a45eb6f83fac264d2ee476ac710938f5ce6ff9 (patch)
tree428e1590db19e1053b0c589d861dcf8d0e44b92a
parent2b1a7c4b7250018ef4d07ca540cf137a78573a2c (diff)
downloadlibssh-25a45eb6f83fac264d2ee476ac710938f5ce6ff9.tar.gz
libssh-25a45eb6f83fac264d2ee476ac710938f5ce6ff9.tar.xz
libssh-25a45eb6f83fac264d2ee476ac710938f5ce6ff9.zip
tests: Fix warning about expected format for printf
/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 <fidencio@redhat.com>
-rw-r--r--tests/benchmarks/bench_scp.c4
1 files 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);