]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
smb3: fix compiler warning in reparse code
authorSteve French <stfrench@microsoft.com>
Mon, 9 Dec 2024 17:25:04 +0000 (11:25 -0600)
committerSteve French <stfrench@microsoft.com>
Mon, 9 Dec 2024 21:20:58 +0000 (15:20 -0600)
utf8s_to_utf16s() specifies pwcs as a wchar_t pointer (whether big endian
or little endian is passed in as an additional parm), so to remove a
distracting compile warning it needs to be cast as (wchar_t *) in
parse_reparse_wsl_symlink() as done by other callers.

Fixes: 06a7adf318a3 ("cifs: Add support for parsing WSL-style symlinks")
Reviewed-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/reparse.c

index 50b1aba2000899ebf830425330465abea1ecab79..d88b41133e00c6cabfeeeea068c3e166f25df581 100644 (file)
@@ -676,7 +676,7 @@ static int parse_reparse_wsl_symlink(struct reparse_wsl_symlink_data_buffer *buf
                return -ENOMEM;
        symname_utf16_len = utf8s_to_utf16s(buf->PathBuffer, symname_utf8_len,
                                            UTF16_LITTLE_ENDIAN,
-                                           symname_utf16, symname_utf8_len * 2);
+                                           (wchar_t *) symname_utf16, symname_utf8_len * 2);
        if (symname_utf16_len < 0) {
                kfree(symname_utf16);
                return symname_utf16_len;