/hg/icedtea8-forest/jdk: 6 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Mon Jul 18 05:27:52 UTC 2016


changeset 36d2eae4d024 in /hg/icedtea8-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea8-forest/jdk?cmd=changeset;node=36d2eae4d024
author: andrew
date: Mon Jul 18 02:27:22 2016 +0100

	PR3095: Fix warnings in URLClassPath.c


changeset 9d8d61aaca12 in /hg/icedtea8-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea8-forest/jdk?cmd=changeset;node=9d8d61aaca12
author: alanb
date: Thu Feb 13 14:08:12 2014 +0000

	8034856, PR3095: gcc warnings compiling src/solaris/native/sun/security/pkcs11
	8034857, PR3095: gcc warnings compiling src/solaris/native/sun/management
	Reviewed-by: sla, mullan


changeset a1fd9557e035 in /hg/icedtea8-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea8-forest/jdk?cmd=changeset;node=a1fd9557e035
author: andrew
date: Mon Jul 18 02:42:14 2016 +0100

	PR2821: Support building OpenJDK with --disable-headful
	Summary: Remove JAVASE_EMBEDDED ifdef which causes BUILD_HEADLESS_ONLY build to fail.


changeset 320acd2cb962 in /hg/icedtea8-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea8-forest/jdk?cmd=changeset;node=320acd2cb962
author: mikael
date: Mon Jul 18 03:44:20 2016 +0100

	8035287, PR3095: gcc warnings compiling various libraries files
	Reviewed-by: prr


changeset abc809afa7e0 in /hg/icedtea8-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea8-forest/jdk?cmd=changeset;node=abc809afa7e0
author: mikael
date: Mon Feb 24 11:24:43 2014 -0800

	8035054, PR3095: JarFacade.c should not include ctype.h
	Reviewed-by: alanb


changeset ee0b65b8fd10 in /hg/icedtea8-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea8-forest/jdk?cmd=changeset;node=ee0b65b8fd10
author: ysuenaga
date: Mon Jul 18 04:07:17 2016 +0100

	8160294, PR2882, PR3095: Some client libraries cannot be built with GCC 6
	Reviewed-by: prr, flar, erikj, kbarrett


diffstat:

 src/share/instrument/JarFacade.c                             |  12 ++----------
 src/share/native/com/sun/java/util/jar/pack/bands.cpp        |  10 ++--------
 src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c    |   3 ++-
 src/share/native/sun/font/layout/SunLayoutEngine.cpp         |   3 ++-
 src/share/native/sun/java2d/loops/AlphaMath.c                |   4 ++--
 src/share/native/sun/java2d/opengl/OGLContext.c              |   2 ++
 src/share/native/sun/misc/URLClassPath.c                     |   5 +++++
 src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h |   5 +++++
 src/solaris/native/sun/awt/awt_Font.c                        |   5 ++++-
 src/solaris/native/sun/awt/jawt.c                            |   2 +-
 src/solaris/native/sun/java2d/x11/X11SurfaceData.c           |   2 +-
 src/solaris/native/sun/management/LinuxOperatingSystem.c     |   3 ++-
 src/solaris/native/sun/security/pkcs11/j2secmod_md.c         |   1 +
 src/solaris/native/sun/security/pkcs11/wrapper/p11_md.h      |   5 +++++
 src/solaris/native/sun/xawt/XToolkit.c                       |   2 +-
 15 files changed, 37 insertions(+), 27 deletions(-)

diffs (278 lines):

diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/share/instrument/JarFacade.c
--- a/src/share/instrument/JarFacade.c	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/share/instrument/JarFacade.c	Mon Jul 18 04:07:17 2016 +0100
@@ -23,14 +23,6 @@
  * questions.
  */
 
-#ifdef _WIN32
-/*
- * Win* needs this include. However, Linux and Solaris do not.
- * Having this include on Solaris SPARC breaks having non US-ASCII
- * characters in the value of the Premain-Class attribute.
- */
-#include <ctype.h>
-#endif /* _WIN32 */
 #include <string.h>
 #include <stdlib.h>
 
@@ -58,13 +50,13 @@
             size_t value_len;
 
             /* skip any leading white space */
-            while (isspace(*begin)) {
+            while (*begin == ' ') {
                 begin++;
             }
 
             /* skip any trailing white space */
             end = &begin[strlen(begin)];
-            while (end > begin && isspace(end[-1])) {
+            while (end > begin && end[-1] == ' ') {
                 end--;
             }
 
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/share/native/com/sun/java/util/jar/pack/bands.cpp
--- a/src/share/native/com/sun/java/util/jar/pack/bands.cpp	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/share/native/com/sun/java/util/jar/pack/bands.cpp	Mon Jul 18 04:07:17 2016 +0100
@@ -288,7 +288,7 @@
   { e_##name,  #name, /*debug only*/ \
     cspec, ix }
 
-const band_init all_band_inits[] = {
+const band_init all_band_inits[BAND_LIMIT+1] = {
 //BAND_INIT(archive_magic, BYTE1_spec, 0),
 //BAND_INIT(archive_header, UNSIGNED5_spec, 0),
 //BAND_INIT(band_headers, BYTE1_spec, 0),
@@ -448,14 +448,8 @@
   BAND_INIT(file_modtime, DELTA5_spec, 0),
   BAND_INIT(file_options, UNSIGNED5_spec, 0),
 //BAND_INIT(file_bits, BYTE1_spec, 0),
-#ifndef PRODUCT
-  { 0, 0, 0, 0 }
-#else
-  { 0, 0 }
-#endif
+  { 0, NULL, 0, 0 }
 };
-#define NUM_BAND_INITS \
-        (sizeof(all_band_inits)/sizeof(all_band_inits[0]))
 
 band* band::makeBands(unpacker* u) {
   band* tmp_all_bands = U_NEW(band, BAND_LIMIT);
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c
--- a/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c	Mon Jul 18 04:07:17 2016 +0100
@@ -237,13 +237,14 @@
 SplashDecodeJpegStream(Splash * splash, SplashStream * stream)
 {
     struct jpeg_decompress_struct cinfo;
-    int success = 0;
+    int success;
     struct my_error_mgr jerr;
 
     cinfo.err = jpeg_std_error(&jerr.pub);
     jerr.pub.error_exit = my_error_exit;
 
     if (setjmp(jerr.setjmp_buffer)) {
+        success = 0;
         goto done;
     }
     jpeg_create_decompress(&cinfo);
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/share/native/sun/font/layout/SunLayoutEngine.cpp
--- a/src/share/native/sun/font/layout/SunLayoutEngine.cpp	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/share/native/sun/font/layout/SunLayoutEngine.cpp	Mon Jul 18 04:07:17 2016 +0100
@@ -151,7 +151,8 @@
     return;
   }
 
-  if (min < 0) min = 0; if (max < min) max = min; /* defensive coding */
+  if (min < 0) min = 0;
+  if (max < min) max = min; /* defensive coding */
   // have to copy, yuck, since code does upcalls now.  this will be soooo slow
   jint len = max - min;
   jchar buffer[256];
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/share/native/sun/java2d/loops/AlphaMath.c
--- a/src/share/native/sun/java2d/loops/AlphaMath.c	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/share/native/sun/java2d/loops/AlphaMath.c	Mon Jul 18 04:07:17 2016 +0100
@@ -34,8 +34,8 @@
     unsigned int j;
 
     for (i = 1; i < 256; i++) {                 /* SCALE == (1 << 24) */
-        int inc = (i << 16) + (i<<8) + i;       /* approx. SCALE * (i/255.0) */
-        int val = inc + (1 << 23);              /* inc + SCALE*0.5 */
+        unsigned int inc = (i << 16) + (i<<8) + i;       /* approx. SCALE * (i/255.0) */
+        unsigned int val = inc + (1 << 23);              /* inc + SCALE*0.5 */
         for (j = 1; j < 256; j++) {
             mul8table[i][j] = (val >> 24);      /* val / SCALE */
             val += inc;
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/share/native/sun/java2d/opengl/OGLContext.c
--- a/src/share/native/sun/java2d/opengl/OGLContext.c	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/share/native/sun/java2d/opengl/OGLContext.c	Mon Jul 18 04:07:17 2016 +0100
@@ -38,6 +38,8 @@
 #include "GraphicsPrimitiveMgr.h"
 #include "Region.h"
 
+#include "jvm.h"
+
 /**
  * The following methods are implemented in the windowing system (i.e. GLX
  * and WGL) source files.
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/share/native/sun/misc/URLClassPath.c
--- a/src/share/native/sun/misc/URLClassPath.c	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/share/native/sun/misc/URLClassPath.c	Mon Jul 18 04:07:17 2016 +0100
@@ -24,6 +24,7 @@
  */
 
 #include <string.h>
+#include <stdlib.h>
 
 #include "jni.h"
 #include "jni_util.h"
@@ -33,6 +34,10 @@
 
 #include "sun_misc_URLClassPath.h"
 
+/* defined in libverify.so/verify.dll (src file common/check_format.c) */
+extern jboolean VerifyClassname(char *utf_name, jboolean arrayAllowed);
+extern jboolean VerifyFixClassname(char *utf_name);
+
 extern char*
 getUTF(JNIEnv *env, jstring str, char* localBuf, int bufSize);
 
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h
--- a/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h	Mon Jul 18 04:07:17 2016 +0100
@@ -55,6 +55,9 @@
  * @author Martin Schlaeffer <schlaeff at sbox.tugraz.at>
  */
 
+#ifndef _PKCS11WRAPPER_H
+#define _PKCS11WRAPPER_H 1
+
 /* disable asserts in product mode */
 #ifndef DEBUG
   #ifndef NDEBUG
@@ -461,3 +464,5 @@
 #define free(c)         (p11free((c), THIS_FILE, __LINE__))
 
 #endif
+
+#endif /* _PKCS11WRAPPER_H */
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/solaris/native/sun/awt/awt_Font.c
--- a/src/solaris/native/sun/awt/awt_Font.c	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/solaris/native/sun/awt/awt_Font.c	Mon Jul 18 04:07:17 2016 +0100
@@ -454,6 +454,7 @@
         int32_t i, size;
         char *fontsetname = NULL;
         char *nativename = NULL;
+        Boolean doFree = FALSE;
         jobjectArray componentFonts = NULL;
         jobject peer = NULL;
         jobject fontDescriptor = NULL;
@@ -493,8 +494,10 @@
 
             if (!JNU_IsNull(env, fontDescriptorName)) {
                 nativename = (char *) JNU_GetStringPlatformChars(env, fontDescriptorName, NULL);
+                doFree = TRUE;
             } else {
                 nativename = "";
+                doFree = FALSE;
             }
 
             fdata->flist[i].xlfd = malloc(strlen(nativename)
@@ -502,7 +505,7 @@
             jio_snprintf(fdata->flist[i].xlfd, strlen(nativename) + 10,
                          nativename, size * 10);
 
-            if (nativename != NULL && nativename != "")
+            if (nativename != NULL && doFree)
                 JNU_ReleaseStringPlatformChars(env, fontDescriptorName, (const char *) nativename);
 
             /*
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/solaris/native/sun/awt/jawt.c
--- a/src/solaris/native/sun/awt/jawt.c	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/solaris/native/sun/awt/jawt.c	Mon Jul 18 04:07:17 2016 +0100
@@ -33,7 +33,7 @@
  */
 JNIEXPORT jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt)
 {
-#if defined(JAVASE_EMBEDDED) && defined(HEADLESS)
+#if defined(HEADLESS)
     /* there are no AWT libs available at all */
     return JNI_FALSE;
 #else
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/solaris/native/sun/java2d/x11/X11SurfaceData.c
--- a/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Mon Jul 18 04:07:17 2016 +0100
@@ -513,7 +513,7 @@
     xsdo->cData = xsdo->configData->color_data;
 
     XShared_initSurface(env, xsdo, depth, width, height, drawable);
-    xsdo->xrPic = NULL;
+    xsdo->xrPic = None;
 #endif /* !HEADLESS */
 }
 
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/solaris/native/sun/management/LinuxOperatingSystem.c
--- a/src/solaris/native/sun/management/LinuxOperatingSystem.c	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/solaris/native/sun/management/LinuxOperatingSystem.c	Mon Jul 18 04:07:17 2016 +0100
@@ -35,6 +35,7 @@
 #include <stdlib.h>
 #include <dlfcn.h>
 #include <pthread.h>
+#include <inttypes.h>
 #include "sun_management_OperatingSystemImpl.h"
 
 struct ticks {
@@ -57,7 +58,7 @@
     ticks *cpus;
 } counters;
 
-#define DEC_64 "%lld"
+#define DEC_64 "%"SCNd64
 
 static void next_line(FILE *f) {
     while (fgetc(f) != '\n');
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/solaris/native/sun/security/pkcs11/j2secmod_md.c
--- a/src/solaris/native/sun/security/pkcs11/j2secmod_md.c	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/solaris/native/sun/security/pkcs11/j2secmod_md.c	Mon Jul 18 04:07:17 2016 +0100
@@ -32,6 +32,7 @@
 #include <jni_util.h>
 
 #include "j2secmod.h"
+#include "wrapper/pkcs11wrapper.h"
 
 void *findFunction(JNIEnv *env, jlong jHandle, const char *functionName) {
     void *hModule = (void*)jlong_to_ptr(jHandle);
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/solaris/native/sun/security/pkcs11/wrapper/p11_md.h
--- a/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.h	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.h	Mon Jul 18 04:07:17 2016 +0100
@@ -56,6 +56,9 @@
 
 /* defines for UNIX platforms *************************************************/
 
+#ifndef _P11_MD_H
+#define _P11_MD_H 1
+
 #define CK_PTR *
 #define CK_DEFINE_FUNCTION(returnType, name) returnType name
 #define CK_DECLARE_FUNCTION(returnType, name) returnType name
@@ -83,3 +86,5 @@
 
 };
 typedef struct ModuleData ModuleData;
+
+#endif  /* _P11_MD_H */
diff -r 7a8eb1c17b1f -r ee0b65b8fd10 src/solaris/native/sun/xawt/XToolkit.c
--- a/src/solaris/native/sun/xawt/XToolkit.c	Thu Jul 14 04:02:35 2016 +0100
+++ b/src/solaris/native/sun/xawt/XToolkit.c	Mon Jul 18 04:07:17 2016 +0100
@@ -719,7 +719,7 @@
     if (pollFds[0].revents) {
         // Events in X pipe
         update_poll_timeout(TIMEOUT_EVENTS);
-        PRINT2("performPoll(): TIMEOUT_EVENTS curPollTimeout = %ld \n", curPollTimeout);
+        PRINT2("performPoll(): TIMEOUT_EVENTS curPollTimeout = %d \n", curPollTimeout);
     }
     return TRUE;
 


More information about the distro-pkg-dev mailing list