RFR (XXS) 8173197: Change for 8172547 breaks builds with VS2010

Langer, Christoph christoph.langer at sap.com
Mon Jan 23 10:54:27 UTC 2017


Hi,

can I please get a review for the following trivial fix:

--- a/src/java.base/windows/native/libnio/ch/WindowsSelectorImpl.c      Mon Jan 23 10:35:30 2017 +0100
+++ b/src/java.base/windows/native/libnio/ch/WindowsSelectorImpl.c      Mon Jan 23 11:47:03 2017 +0100
@@ -75,8 +75,8 @@
     } else if (timeout < 0) {
        tv = NULL;
     } else {
+        jlong sec = timeout / 1000;
         tv = &timevalue;
-        jlong sec = timeout / 1000;
         //
         // struct timeval members are signed 32-bit integers so the
         // signed 64-bit jlong needs to be clamped

The fix for 8172547 [1] introduces code that violates C98 standard and causes a compile error with Mircosoft VS 2010 because the variable declaration is not done at the beginning of its scope. I oversaw that myself when reviewing the change.

Thanks
Christoph

[1]: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/abc51aa40c7e

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20170123/05548011/attachment.html>


More information about the nio-dev mailing list