1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-08-01 11:26:53 +03:00

tidy-up: bump casts from int to long for large C99 types in printfs

Cast large integer types to avoid dealing with printf masks for
`size_t` and other C99 types. Some of existing code used `int`
for this, bump them to `long`.

Ref: afa6b86560 #1257

Closes #1264
This commit is contained in:
Viktor Szakats
2023-12-01 19:29:28 +00:00
parent afa6b86560
commit 2e5a8719d7
18 changed files with 62 additions and 60 deletions

View File

@ -252,8 +252,8 @@ int main(int argc, char *argv[])
else {
if(nread != LIBSSH2_ERROR_EAGAIN)
/* no need to output this for the EAGAIN case */
fprintf(stderr, "libssh2_channel_read returned %d\n",
(int)nread);
fprintf(stderr, "libssh2_channel_read returned %ld\n",
(long)nread);
}
}
while(nread > 0);
@ -279,8 +279,8 @@ int main(int argc, char *argv[])
if(exitsignal)
fprintf(stderr, "\nGot signal: %s\n", exitsignal);
else
fprintf(stderr, "\nEXIT: %d bytecount: %d\n",
exitcode, (int)bytecount);
fprintf(stderr, "\nEXIT: %d bytecount: %ld\n",
exitcode, (long)bytecount);
libssh2_channel_free(channel);
channel = NULL;