mirror of
https://github.com/libssh2/libssh2.git
synced 2025-08-07 08:02:56 +03:00
src: fix type warning in libssh2_sftp_unlink
macro
The `libssh2_sftp_unlink` macro was implicitly casting the `size_t` returned by `strlen` to the `unsigned int` type expected by `libssh2_sftp_unlink_ex`. This fix adds an explicit cast to match similar macro definitions in the same file (e.g. `libssh2_sftp_rename`, `libssh2_sftp_mkdir`). Closes #1406
This commit is contained in:
@@ -307,7 +307,7 @@ LIBSSH2_API int libssh2_sftp_unlink_ex(LIBSSH2_SFTP *sftp,
|
||||
const char *filename,
|
||||
unsigned int filename_len);
|
||||
#define libssh2_sftp_unlink(sftp, filename) \
|
||||
libssh2_sftp_unlink_ex((sftp), (filename), strlen(filename))
|
||||
libssh2_sftp_unlink_ex((sftp), (filename), (unsigned int)strlen(filename))
|
||||
|
||||
LIBSSH2_API int libssh2_sftp_fstatvfs(LIBSSH2_SFTP_HANDLE *handle,
|
||||
LIBSSH2_SFTP_STATVFS *st);
|
||||
|
Reference in New Issue
Block a user