-
Bug
-
Resolution: Unresolved
-
P4
-
9, 11, 17, 20, 21, 22
-
None
Reported by clang:
src\jdk.accessibility\windows\native\libjavaaccessbridge\AccessBridgeATInstance.cpp(150,54): warning: cast to 'void *' from smaller integer type 'DWORD' (aka 'unsigned long') [-Wint-to-void-pointer-cast]
ret = (HANDLE) _beginthreadex(NULL,0,thread_func,(void *)param,0,(unsigned int *)id);
^~~~~~~~~~~~~
src\jdk.accessibility\windows\native\libjavaaccessbridge\AccessBridgeATInstance.cpp(200,94): warning: cast to smaller integer type 'unsigned long' from 'EVENT_STRUCT *' [-Wpointer-to-int-cast]
HANDLE JavaBridgeThreadHandle = BeginThread(JavaBridgeThread,&JavaBridgeThreadId,(DWORD)event_struct);
^~~~~~~~~~~~~~~~~~~
The casts lose the top 32 bits of a pointer and may lead to a crash.
src\jdk.accessibility\windows\native\libjavaaccessbridge\AccessBridgeATInstance.cpp(150,54): warning: cast to 'void *' from smaller integer type 'DWORD' (aka 'unsigned long') [-Wint-to-void-pointer-cast]
ret = (HANDLE) _beginthreadex(NULL,0,thread_func,(void *)param,0,(unsigned int *)id);
^~~~~~~~~~~~~
src\jdk.accessibility\windows\native\libjavaaccessbridge\AccessBridgeATInstance.cpp(200,94): warning: cast to smaller integer type 'unsigned long' from 'EVENT_STRUCT *' [-Wpointer-to-int-cast]
HANDLE JavaBridgeThreadHandle = BeginThread(JavaBridgeThread,&JavaBridgeThreadId,(DWORD)event_struct);
^~~~~~~~~~~~~~~~~~~
The casts lose the top 32 bits of a pointer and may lead to a crash.