From 89776a373c4941437d7aafdd97bf92431db50963 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Mon, 19 Mar 2018 13:46:42 -0700 Subject: [PATCH] 8198897: Compilation errors in jdk.accessibility with VS 2017 Reviewed-by: serb, kaddepalli --- .../windows/native/jaccessinspector/jaccessinspector.cpp | 3 ++- .../windows/native/jaccesswalker/jaccesswalker.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/jdk.accessibility/windows/native/jaccessinspector/jaccessinspector.cpp b/src/jdk.accessibility/windows/native/jaccessinspector/jaccessinspector.cpp index 7798c64e438..5cfec9f2f63 100644 --- a/src/jdk.accessibility/windows/native/jaccessinspector/jaccessinspector.cpp +++ b/src/jdk.accessibility/windows/native/jaccessinspector/jaccessinspector.cpp @@ -1526,7 +1526,8 @@ BOOL UpdateMessageNumber () { size_t messageNumber = g_MessageHistory.GetCurrentMessageIndex() + 1; char text [32] = {0}; if ( 0 != messageCount ) { - ::_snprintf(text, sizeof(text), "%d of %d", messageNumber, messageCount); + ::_snprintf(text, sizeof(text), "%d of %d", (int)messageNumber, + (int) messageCount); } return ::SetWindowText(dlgItem, text); } diff --git a/src/jdk.accessibility/windows/native/jaccesswalker/jaccesswalker.cpp b/src/jdk.accessibility/windows/native/jaccesswalker/jaccesswalker.cpp index 7943374892c..3a5353812a4 100644 --- a/src/jdk.accessibility/windows/native/jaccesswalker/jaccesswalker.cpp +++ b/src/jdk.accessibility/windows/native/jaccesswalker/jaccesswalker.cpp @@ -527,7 +527,7 @@ void Jaccesswalker::addComponentNodes(long vmID, AccessibleContext context, tvi.mask = TVIF_PARAM | TVIF_TEXT; tvi.pszText = (char *) s; // Accessible name and role tvi.cchTextMax = (int)strlen(s); - tvi.lParam = (long) newNode; // Accessibility information + tvi.lParam = (LPARAM) newNode; // Accessibility information TVINSERTSTRUCT tvis; tvis.hParent = treeNodeParent; @@ -544,13 +544,13 @@ void Jaccesswalker::addComponentNodes(long vmID, AccessibleContext context, char s[LINE_BUFSIZE]; sprintf( s, "ERROR calling GetAccessibleContextInfo; vmID = %X, context = %p", - vmID, context ); + vmID, (void*)context ); TVITEM tvi; tvi.mask = TVIF_PARAM | TVIF_TEXT; // text and lParam are only valid parts tvi.pszText = (char *) s; tvi.cchTextMax = (int)strlen(s); - tvi.lParam = (long) newNode; + tvi.lParam = (LPARAM) newNode; TVINSERTSTRUCT tvis; tvis.hParent = treeNodeParent;