diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-12-26 17:42:50 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-12-26 17:42:50 +0100 |
commit | 6ee58e67cbefb6538a20bae5fbe381c21bf99569 (patch) | |
tree | 3e71beefc7bbd3aa978e1a3e6233e967e790798d | |
parent | 9040d7aed77388adae8ac672168e5e89257a4fd6 (diff) | |
parent | 53a1db1a10e811018ac3334b46215e46a9778c12 (diff) | |
download | rneovim-6ee58e67cbefb6538a20bae5fbe381c21bf99569.tar.gz rneovim-6ee58e67cbefb6538a20bae5fbe381c21bf99569.tar.bz2 rneovim-6ee58e67cbefb6538a20bae5fbe381c21bf99569.zip |
Merge pull request #3879 from sethjackson/open-osfhandle
Windows: Fix cast in if_cscope.c
-rw-r--r-- | src/nvim/if_cscope.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c index b78dfdca11..64323896d6 100644 --- a/src/nvim/if_cscope.c +++ b/src/nvim/if_cscope.c @@ -861,17 +861,16 @@ err_closing: csinfo[i].hProc = pi.hProcess; CloseHandle(pi.hThread); - /* TODO - tidy up after failure to create files on pipe handles. */ - if (((fd = _open_osfhandle((OPEN_OH_ARGTYPE)stdin_wr, - _O_TEXT|_O_APPEND)) < 0) - || ((csinfo[i].to_fp = _fdopen(fd, "w")) == NULL)) + // TODO(neovim): tidy up after failure to create files on pipe handles. + if (((fd = _open_osfhandle((intptr_t)stdin_wr, _O_TEXT|_O_APPEND)) < 0) + || ((csinfo[i].to_fp = _fdopen(fd, "w")) == NULL)) { PERROR(_("cs_create_connection: fdopen for to_fp failed")); - if (((fd = _open_osfhandle((OPEN_OH_ARGTYPE)stdout_rd, - _O_TEXT|_O_RDONLY)) < 0) - || ((csinfo[i].fr_fp = _fdopen(fd, "r")) == NULL)) + } + if (((fd = _open_osfhandle((intptr_t)stdout_rd, _O_TEXT|_O_RDONLY)) < 0) + || ((csinfo[i].fr_fp = _fdopen(fd, "r")) == NULL)) { PERROR(_("cs_create_connection: fdopen for fr_fp failed")); - - /* Close handles for file descriptors inherited by the cscope process */ + } + // Close handles for file descriptors inherited by the cscope process. CloseHandle(stdin_rd); CloseHandle(stdout_wr); |