Some g1 code uses int variables as region indices; they should use size_t instead. A few examples from heapRegionSeq.hpp:
HeapWord* alloc_obj_from_region_index(int ind, size_t word_size);
int find(HeapRegion* hr);
void iterate_from(int idx, HeapRegionClosure* blk);
We do use an int, instead of size_t, for region indeces given that there is an assumption that -1 indicates "no region". We could change this assumption so that MAX_SIZE (or the equivalent) indicates "no region". That's a pretty big change though.
Some of this work will be done as part of 7045330 (the HeapRegionSeq part). We'll do the rest (the HeapRegion part) separately as part of this CR.