win,fs: fix C4090 warning with MSVC

When compiling the current code MSVC prints this warning:

    warning C4090: '=': different 'const' qualifiers

This warning was introduced with dc6fdcd where the `(char*)` cast for
the call to `wcstombs` was removed.

Re-adding this cast to silence the warning.

PR-URL: https://github.com/libuv/libuv/pull/3146
Refs: https://github.com/libuv/libuv/pull/2938
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
This commit is contained in:
SeverinLeonhardt 2021-05-13 00:48:29 +02:00 committed by GitHub
parent 0714eded19
commit 882ee25346
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1238,7 +1238,7 @@ void fs__mktemp(uv_fs_t* req, uv__fs_mktemp_func func) {
uint64_t v;
char* path;
path = req->path;
path = (char*)req->path;
len = wcslen(req->file.pathw);
ep = req->file.pathw + len;
if (len < num_x || wcsncmp(ep - num_x, L"XXXXXX", num_x)) {