File openjdk-6-src-b20-array-subscript-has-type-char.patch of Package java-1_6_0-openjdk
Index: icedtea6-1.10/openjdk/hotspot/src/share/vm/adlc/dict2.cpp
===================================================================
--- icedtea6-1.10.orig/openjdk/hotspot/src/share/vm/adlc/dict2.cpp
+++ icedtea6-1.10/openjdk/hotspot/src/share/vm/adlc/dict2.cpp
@@ -287,12 +287,12 @@ int hashstr(const void *t) {
register int sum = 0;
register const char *s = (const char *)t;
- while( ((c = s[k]) != '\0') && (k < MAXID-1) ) { // Get characters till nul
+ while( ((c = s[(int)k]) != '\0') && (k < MAXID-1) ) { // Get characters till nul
c = (c<<1)+1; // Characters are always odd!
- sum += c + (c<<shft[k++]); // Universal hash function
+ sum += c + (c<<shft[(int)k++]); // Universal hash function
}
assert( k < (MAXID), "Exceeded maximum name length");
- return (int)((sum+xsum[k]) >> 1); // Hash key, un-modulo'd table size
+ return (int)((sum+xsum[(int)k]) >> 1); // Hash key, un-modulo'd table size
}
//------------------------------hashptr--------------------------------------