pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/openjdk11



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sat Mar 21 10:46:57 UTC 2020

Modified Files:
        pkgsrc/lang/openjdk11: distinfo
Added Files:
        pkgsrc/lang/openjdk11/patches: patch-src_hotspot_share_libadt_dict.cpp

Log Message:
lang/openjdk11: add patch for -Wchar-subscripts


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/lang/openjdk11/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/openjdk11/patches/patch-src_hotspot_share_libadt_dict.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/openjdk11/distinfo
diff -u pkgsrc/lang/openjdk11/distinfo:1.8 pkgsrc/lang/openjdk11/distinfo:1.9
--- pkgsrc/lang/openjdk11/distinfo:1.8  Tue Feb 11 02:30:42 2020
+++ pkgsrc/lang/openjdk11/distinfo      Sat Mar 21 10:46:57 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2020/02/11 02:30:42 ryoon Exp $
+$NetBSD: distinfo,v 1.9 2020/03/21 10:46:57 rillig Exp $
 
 SHA1 (bootstrap-jdk-1.11.0.5.8-netbsd-7-amd64-20190928.tar.xz) = d76599619b8bea879b8202b3efc38a82335d2e8c
 RMD160 (bootstrap-jdk-1.11.0.5.8-netbsd-7-amd64-20190928.tar.xz) = a1b998e4e7edfb73ec35b0cc94895d9af16a8cd8
@@ -25,6 +25,7 @@ SHA1 (patch-src_hotspot_os__cpu_bsd__aar
 SHA1 (patch-src_hotspot_os_bsd_os__bsd.cpp) = 86d9772592524f4119b4cf99671ac4d1224a28da
 SHA1 (patch-src_hotspot_os_bsd_os__perf__bsd.cpp) = 7bb57f82f3a93adc1970ed4215148fc02ecbcd5a
 SHA1 (patch-src_hotspot_os_posix_os__posix.cpp) = e70e8c1e59f0be184a7a1d6e9d11ac7b934ce4b2
+SHA1 (patch-src_hotspot_share_libadt_dict.cpp) = ad7ee25e66232b07db6abe7b13f9d6ed05a61202
 SHA1 (patch-src_java.base_bsd_native_libjava_ProcessHandleImpl__bsd.c) = fbc0aa6656292535fb38344fee7178b6f625f58a
 SHA1 (patch-src_java.base_unix_native_libjava_ProcessHandleImpl__unix.c) = 39c7afb3c36fa9557d2a660c4b4068b5684c552f
 SHA1 (patch-src_java.base_unix_native_libjava_ProcessHandleImpl__unix.h) = 121357cb76b4a96c06cc2bf670579e0b27f66fc1

Added files:

Index: pkgsrc/lang/openjdk11/patches/patch-src_hotspot_share_libadt_dict.cpp
diff -u /dev/null pkgsrc/lang/openjdk11/patches/patch-src_hotspot_share_libadt_dict.cpp:1.1
--- /dev/null   Sat Mar 21 10:46:57 2020
+++ pkgsrc/lang/openjdk11/patches/patch-src_hotspot_share_libadt_dict.cpp       Sat Mar 21 10:46:57 2020
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_hotspot_share_libadt_dict.cpp,v 1.1 2020/03/21 10:46:57 rillig Exp $
+
+Fix for -Werror=char-subscripts:
+
+> dict.cpp:15:28: warning: array subscript has type ‘char’ [-Wchar-subscripts]
+>      sum += c + (c<<shft[k++]);  // Universal hash function
+>                             ^
+> dict.cpp:17:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
+>    return (int)((sum+xsum[k]) >> 1); // Hash key, un-modulo'd table size
+
+The variable k only ever gets values between 0 and MAXID - 1, which is
+20. Therefore changing the type doesn't affect the result of the
+function. At optimization levels > 0, GCC 5.5.0 compiles to the same
+code, no matter whether the variable type is signed char or unsigned int.
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94247
+
+--- src/hotspot/share/libadt/dict.cpp.orig     2020-01-15 18:29:57.000000000 +0000
++++ src/hotspot/share/libadt/dict.cpp
+@@ -305,7 +305,8 @@ void Dict::print() {
+ // limited to MAXID characters in length.  Experimental evidence on 150K of
+ // C text shows excellent spreading of values for any size hash table.
+ int hashstr(const void *t) {
+-  register char c, k = 0;
++  register char c = 0;
++  register unsigned char k = 0;
+   register int32_t sum = 0;
+   register const char *s = (const char *)t;
+ 



Home | Main Index | Thread Index | Old Index