1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-12-24 19:37:49 +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

@@ -317,7 +317,7 @@ int main(int argc, char *argv[])
char buf[1024];
ssize_t err = libssh2_channel_read(channel, buf, sizeof(buf));
if(err < 0)
fprintf(stderr, "Unable to read response: %d\n", (int)err);
fprintf(stderr, "Unable to read response: %ld\n", (long)err);
else {
fwrite(buf, 1, (size_t)err, stdout);
}