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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user