mirror of
https://github.com/libssh2/libssh2.git
synced 2025-07-31 00:03:08 +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:
@ -276,8 +276,8 @@ int main(int argc, char *argv[])
|
||||
continue;
|
||||
}
|
||||
if(nwritten < 0) {
|
||||
fprintf(stderr, "libssh2_channel_write: %d\n",
|
||||
(int)nwritten);
|
||||
fprintf(stderr, "libssh2_channel_write: %ld\n",
|
||||
(long)nwritten);
|
||||
goto shutdown;
|
||||
}
|
||||
wr += nwritten;
|
||||
@ -288,7 +288,7 @@ int main(int argc, char *argv[])
|
||||
if(LIBSSH2_ERROR_EAGAIN == len)
|
||||
break;
|
||||
else if(len < 0) {
|
||||
fprintf(stderr, "libssh2_channel_read: %d", (int)len);
|
||||
fprintf(stderr, "libssh2_channel_read: %ld", (long)len);
|
||||
goto shutdown;
|
||||
}
|
||||
wr = 0;
|
||||
|
Reference in New Issue
Block a user