On Wed, 20 Mar 2024 06:38:59 GMT, Julian Waters <jwat...@openjdk.org> wrote:
>> We should set the -permissive- flag for the Microsoft Visual C compiler, as >> was requested by the now backed out >> [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes >> the Visual C compiler much less accepting of ill formed code, which will >> improve code quality on Windows in the future. > > Julian Waters has updated the pull request incrementally with two additional > commits since the last revision: > > - Revert Formatting in awt_Component.cpp > - Revert Formatting in awt_Window.cpp src/java.desktop/windows/native/libawt/windows/awt_DnDDS.cpp line 44: > 42: #include <shlobj.h> > 43: > 44: // Don't want to pull in the redefined allocation functions Maybe this needs to be clarified a bit: Suggestion: // These files must be included before awt.h, since the latter redefines malloc // to Do_Not_Use_Malloc, etc, and that will break these files. Also, please mark conversations as resolved in the GitHub UI once you think they are addressed. That makes it much easier for reviewers to understand what parts of the reviews that have not been addressed. src/java.desktop/windows/native/libawt/windows/awt_DnDDT.cpp line 31: > 29: > 30: // Don't want to pull in the redefined allocation functions > 31: #include "awt_ole.h" Suggestion: // awt_ole.h must be included before awt.h, since the latter redefines malloc // to Do_Not_Use_Malloc, etc, and that will break awt_ole.h. #include "awt_ole.h" src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp line 544: > 542: and for all other dialogs AwtToolkit's HWND is used. > 543: */ > 544: else if (awtParent != NULL) { Suggestion: else if (awtParent != NULL) { src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp line 546: > 544: else if (awtParent != NULL) { > 545: setup.hwndOwner = AwtToolkit::GetInstance().GetHWnd(); > 546: } else { Suggestion: } else { src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp line 779: > 777: } > 778: > 779: Suggestion: src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp line 1230: > 1228: jdouble imgY = (jdouble) ((yPixelOrg * 72)/(jdouble) yPixelRes); > 1229: jdouble imgWid = (jdouble) ((imgPixelWid * 72)/(jdouble) xPixelRes); > 1230: jdouble imgHgt = (jdouble) ((imgPixelHgt * 72)/(jdouble) yPixelRes); Suggestion: jdouble imgX = (jdouble)((xPixelOrg * 72)/(jdouble)xPixelRes); jdouble imgY = (jdouble)((yPixelOrg * 72)/(jdouble)yPixelRes); jdouble imgWid = (jdouble)((imgPixelWid * 72)/(jdouble)xPixelRes); jdouble imgHgt = (jdouble)((imgPixelHgt * 72)/(jdouble)yPixelRes);``` src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp line 1316: > 1314: env->CallVoidMethod(newPaper, setImageableID, ix, iy, iw, ih); > 1315: > 1316: Suggestion: src/java.desktop/windows/native/libawt/windows/awt_Window.cpp line 3153: > 3151: } > 3152: > 3153: window = (AwtWindow *) pData; Suggestion: window = (AwtWindow *)pData; ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1535490288 PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1535491034 PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1535493157 PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1535493362 PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1535493818 PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1535494973 PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1535495291 PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1535496714