[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/11] tests: Fix warning about expected format for printf
[Thread Prev] | [Thread Next]
- Subject: [PATCH 11/11] tests: Fix warning about expected format for printf
- From: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 17 Sep 2015 16:37:45 +0200
- To: libssh@xxxxxxxxxx
- Cc: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
/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@xxxxxxxxxx>
---
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 340637b..71aba28 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);
--
2.4.3
| [PATCH 00/11] cleanup and removing some warnings | Fabiano Fidêncio <fidencio@xxxxxxxxxx> |