8198897: Compilation errors in jdk.accessibility with VS 2017
Reviewed-by: serb, kaddepalli
--- a/src/jdk.accessibility/windows/native/jaccessinspector/jaccessinspector.cpp Mon Mar 19 11:29:50 2018 -0700
+++ b/src/jdk.accessibility/windows/native/jaccessinspector/jaccessinspector.cpp Mon Mar 19 13:46:42 2018 -0700
@@ -1526,7 +1526,8 @@
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);
}
--- a/src/jdk.accessibility/windows/native/jaccesswalker/jaccesswalker.cpp Mon Mar 19 11:29:50 2018 -0700
+++ b/src/jdk.accessibility/windows/native/jaccesswalker/jaccesswalker.cpp Mon Mar 19 13:46:42 2018 -0700
@@ -527,7 +527,7 @@
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 @@
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;