< prev index next >

src/share/vm/utilities/workgroup.cpp

Print this page
rev 7793 : 8073315: Enable gcc -Wtype-limits and fix upcoming issues.
Summary: Relevant fixes in blockOffsetTable.cpp, os_linux.cpp, parCardTableModRefBS.cpp.

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -122,11 +122,11 @@
 
 GangWorker* AbstractWorkGang::gang_worker(uint i) const {
   // Array index bounds checking.
   GangWorker* result = NULL;
   assert(gang_workers() != NULL, "No workers for indexing");
-  assert(((i >= 0) && (i < total_workers())), "Worker index out of bounds");
+  assert(i < total_workers(), "Worker index out of bounds");
   result = _gang_workers[i];
   assert(result != NULL, "Indexing to null worker");
   return result;
 }
 

@@ -460,11 +460,11 @@
   _claimed = 0;
 #endif
 }
 
 bool SubTasksDone::is_task_claimed(uint t) {
-  assert(0 <= t && t < _n_tasks, "bad task id.");
+  assert(t < _n_tasks, "bad task id.");
   uint old = _tasks[t];
   if (old == 0) {
     old = Atomic::cmpxchg(1, &_tasks[t], 0);
   }
   assert(_tasks[t] == 1, "What else?");
< prev index next >