--- old/src/java.desktop/windows/native/libawt/windows/awt_Toolkit.cpp 2018-09-30 07:53:05.211000000 +0530 +++ new/src/java.desktop/windows/native/libawt/windows/awt_Toolkit.cpp 2018-09-30 07:53:04.939000000 +0530 @@ -415,7 +415,7 @@ // path of the touch keyboard executable. TCHAR* const searchedStrStart = ::_tcsstr(tabTipFilePath, searchedStr); if (searchedStrStart != NULL) { - searchedStrStartIndex = searchedStrStart - tabTipFilePath; + searchedStrStartIndex = static_cast(searchedStrStart - tabTipFilePath); // Get value of 'CommonProgramFiles' environment variable, if the // file path of the touch keyboard executable was found in 32-bit @@ -446,7 +446,7 @@ // the null-terminating character. DWORD exeFilePathLen = oldBytesCopied / sizeof(TCHAR); if (commonFilesDirPathLen > 0) { - exeFilePathLen = exeFilePathLen - searchedStrLen + + exeFilePathLen = exeFilePathLen - static_cast(searchedStrLen) + commonFilesDirPathLen; }