8073315: Enable gcc -Wtype-limits and fix upcoming issues

Relevant fixes in blockOffsetTable.cpp, os_linux.cpp, parCardTableModRefBS.cpp.

Reviewed-by: jwilhelm, kbarrett, simonis
This commit is contained in:
Goetz Lindenmaier 2015-02-16 14:07:36 +01:00
parent 2632925f9f
commit a7edf52a02
28 changed files with 71 additions and 86 deletions

View file

@ -2902,18 +2902,13 @@ void VM_RedefineClasses::rewrite_cp_refs_in_stack_map_table(
// }
assert(stackmap_p + 1 <= stackmap_end, "no room for frame_type");
// The Linux compiler does not like frame_type to be u1 or u2. It
// issues the following warning for the first if-statement below:
//
// "warning: comparison is always true due to limited range of data type"
//
u4 frame_type = *stackmap_p;
u1 frame_type = *stackmap_p;
stackmap_p++;
// same_frame {
// u1 frame_type = SAME; /* 0-63 */
// }
if (frame_type >= 0 && frame_type <= 63) {
if (frame_type <= 63) {
// nothing more to do for same_frame
}