From: Shankar Giri Venkita Giri Date: Thu, 5 May 2016 10:54:53 +0000 (+0200) Subject: Fix return types for mingw-w64 X-Git-Tag: 2.3.0alpha1~1643^2~56 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=88b68ee004884e519d2d585fa18b424824f6b978;p=features.git Fix return types for mingw-w64 This is needed for warning-free compilation with mingw-w64, and does not hurt for other build configurations. Patch by Shankar Giri Venkita Giri (bug 10053). --- diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index 310e621e17..657343fb93 100644 --- a/src/support/filetools.cpp +++ b/src/support/filetools.cpp @@ -1065,7 +1065,7 @@ cmd_ret const runCommand(string const & cmd) 0, 0, &startup, &process)) { CloseHandle(process.hThread); - int fno = _open_osfhandle((long)in, _O_RDONLY); + int fno = _open_osfhandle(static_cast(in), _O_RDONLY); CloseHandle(out); inf = _fdopen(fno, "r"); } diff --git a/src/support/os_win32.cpp b/src/support/os_win32.cpp index 292555d6c7..a6e5da7c5a 100644 --- a/src/support/os_win32.cpp +++ b/src/support/os_win32.cpp @@ -569,7 +569,7 @@ bool autoOpenFile(string const & filename, auto_open_mode const mode, // reference: http://msdn.microsoft.com/en-us/library/bb762153.aspx char const * action = (mode == VIEW) ? "open" : "edit"; - bool success = reinterpret_cast(ShellExecute(NULL, action, + bool success = reinterpret_cast(ShellExecute(NULL, action, to_local8bit(from_utf8(filename)).c_str(), NULL, NULL, 1)) > 32; if (!path.empty() && !lyxrc.texinputs_prefix.empty()) {