win: fix sizeof-pointer-div warning

short_path's type changed from WCHAR array to WCHAR*
in https://github.com/libuv/libuv/pull/1267, leading
to a sizeof-pointer-div warning.

Fixes: https://github.com/libuv/libuv/issues/2138
PR-URL: https://github.com/libuv/libuv/pull/2139
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
This commit is contained in:
cjihrig 2019-01-10 21:54:58 -05:00
parent ee48e6e4dc
commit d39959c80d
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5

View File

@ -230,8 +230,11 @@ int uv_fs_event_start(uv_fs_event_t* handle,
*/
/* Convert to short path. */
short_path = short_path_buffer;
if (!GetShortPathNameW(pathw, short_path, ARRAY_SIZE(short_path))) {
if (GetShortPathNameW(pathw,
short_path_buffer,
ARRAY_SIZE(short_path_buffer))) {
short_path = short_path_buffer;
} else {
short_path = NULL;
}