Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8201262

Fix warnings with VS2017 in jdk.accessibility

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 11
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      Description

      When compiling jdk.accessibility with VS2017, the following warnings are triggered. I will disable them from the makefile, but the component team should investigate if this should be fixed properly.

      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp(1729): warning C4311: 'type cast': pointer truncation from 'HWND' to 'long'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp(1729): warning C4302: 'type cast': truncation from 'HWND' to 'long'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp(1784): warning C4311: 'type cast': pointer truncation from 'HWND' to 'long'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp(1784): warning C4302: 'type cast': truncation from 'HWND' to 'long'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp(1870): warning C4311: 'type cast': pointer truncation from 'HWND' to 'long'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp(1870): warning C4302: 'type cast': truncation from 'HWND' to 'long'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp(1954): warning C4311: 'type cast': pointer truncation from 'HWND' to 'long'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp(1954): warning C4302: 'type cast': truncation from 'HWND' to 'long'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp(2007): warning C4311: 'type cast': pointer truncation from 'HWND' to 'long'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp(2007): warning C4302: 'type cast': truncation from 'HWND' to 'long'

      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeATInstance.cpp(150): warning C4312: 'type cast': conversion from 'DWORD' to 'void *' of greater size
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeATInstance.cpp(200): warning C4311: 'type cast': pointer truncation from 'EVENT_STRUCT *' to 'DWORD'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeATInstance.cpp(200): warning C4302: 'type cast': truncation from 'EVENT_STRUCT *' to 'DWORD'

      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp(181): warning C4312: 'type cast': conversion from 'UINT' to 'HWND' of greater size
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp(185): warning C4312: 'type cast': conversion from 'LONG' to 'COPYDATASTRUCT *' of greater size
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp(223): warning C4312: 'type cast': conversion from 'UINT' to 'HWND' of greater size
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp(232): warning C4312: 'type cast': conversion from 'UINT' to 'HWND' of greater size
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp(863): warning C4311: 'type cast': pointer truncation from 'HWND' to 'jint'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp(863): warning C4302: 'type cast': truncation from 'HWND' to 'jint'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp(968): warning C4311: 'type cast': pointer truncation from 'HWND' to 'jint'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp(968): warning C4302: 'type cast': truncation from 'HWND' to 'jint'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp(1130): warning C4311: 'type cast': pointer truncation from 'HWND' to 'long'
      c:/erik/jdk/open/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp(1130): warning C4302: 'type cast': truncation from 'HWND' to 'long'

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                erikj Erik Joelsson
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: