Skip to content

Commit

Permalink
win: fix sizeof-pointer-div warning
Browse files Browse the repository at this point in the history
short_path's type changed from WCHAR array to WCHAR*
in libuv#1267, leading
to a sizeof-pointer-div warning.

Fixes: libuv#2138
PR-URL: libuv#2139
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Bartosz Sosnowski <[email protected]>
  • Loading branch information
cjihrig committed Jan 11, 2019
1 parent ee48e6e commit d39959c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/win/fs-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d39959c

Please sign in to comment.