From 882ee25346d7e0cf021f67c22475fcb0995b2c06 Mon Sep 17 00:00:00 2001 From: SeverinLeonhardt Date: Thu, 13 May 2021 00:48:29 +0200 Subject: [PATCH] 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 Reviewed-By: Jameson Nash --- src/win/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win/fs.c b/src/win/fs.c index a083b5e8..67407040 100644 --- a/src/win/fs.c +++ b/src/win/fs.c @@ -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)) {