8201259: Fix warning with VS2017 in jdk.pack
authorksrini
Mon, 23 Apr 2018 11:37:46 -0700
changeset 49859 62d18722a58d
parent 49858 56923ee4f07e
child 49860 ca5216a2a2cc
8201259: Fix warning with VS2017 in jdk.pack Reviewed-by: erikj
make/launcher/Launcher-jdk.pack.gmk
make/lib/Lib-jdk.pack.gmk
src/jdk.pack/share/native/common-unpack/utils.h
--- a/make/launcher/Launcher-jdk.pack.gmk	Mon Apr 23 18:14:35 2018 +0200
+++ b/make/launcher/Launcher-jdk.pack.gmk	Mon Apr 23 11:37:46 2018 -0700
@@ -88,7 +88,6 @@
     CFLAGS_solaris := -KPIC, \
     CFLAGS_macosx := -fPIC, \
     DISABLED_WARNINGS_gcc := unused-result implicit-fallthrough, \
-    DISABLED_WARNINGS_microsoft := 4005, \
     LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
         $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/make/lib/Lib-jdk.pack.gmk	Mon Apr 23 18:14:35 2018 +0200
+++ b/make/lib/Lib-jdk.pack.gmk	Mon Apr 23 11:37:46 2018 -0700
@@ -40,7 +40,6 @@
         $(LIBJAVA_HEADER_FLAGS), \
     CFLAGS_release := -DPRODUCT, \
     DISABLED_WARNINGS_gcc := implicit-fallthrough, \
-    DISABLED_WARNINGS_microsoft := 4005, \
     LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug, \
--- a/src/jdk.pack/share/native/common-unpack/utils.h	Mon Apr 23 18:14:35 2018 +0200
+++ b/src/jdk.pack/share/native/common-unpack/utils.h	Mon Apr 23 11:37:46 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,16 +33,16 @@
 #endif
 
 // overflow management
-#define OVERFLOW ((uint)-1)
-#define PSIZE_MAX (OVERFLOW/2)  /* normal size limit */
+#define POVERFLOW ((uint)-1)
+#define PSIZE_MAX (POVERFLOW/2)  /* normal size limit */
 
 inline size_t scale_size(size_t size, size_t scale) {
-  return (size > PSIZE_MAX / scale) ? OVERFLOW : size * scale;
+  return (size > PSIZE_MAX / scale) ? POVERFLOW : size * scale;
 }
 
 inline size_t add_size(size_t size1, size_t size2) {
   return ((size1 | size2 | (size1 + size2)) > PSIZE_MAX)
-    ? OVERFLOW
+    ? POVERFLOW
     : size1 + size2;
 }