8198897: Compilation errors in jdk.accessibility with VS 2017

Reviewed-by: serb, kaddepalli
This commit is contained in:
Phil Race 2018-03-19 13:46:42 -07:00
parent 5016a4dd96
commit 89776a373c
2 changed files with 5 additions and 4 deletions

View File

@ -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);
}

View File

@ -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;