Remove unused local variables and local functions.
Change-Id: Iacb14a83f59ac20ef5e0616acbf0c6f683b947d5
diff --git a/vm/alloc/Copying.c b/vm/alloc/Copying.c
index b590c79..5ab7f30 100644
--- a/vm/alloc/Copying.c
+++ b/vm/alloc/Copying.c
@@ -144,8 +144,6 @@
static void enqueueBlock(HeapSource *heapSource, size_t block);
static void scavengeReference(Object **obj);
static void verifyReference(const void *obj);
-static void printHeapBitmap(const HeapBitmap *bitmap);
-static void printHeapBitmapSxS(const HeapBitmap *b1, const HeapBitmap *b2);
static bool toSpaceContains(const void *addr);
static bool fromSpaceContains(const void *addr);
static size_t sumHeapBitmap(const HeapBitmap *bitmap);
@@ -821,7 +819,6 @@
static void room(size_t *alloc, size_t *avail, size_t *total)
{
HeapSource *heapSource;
- size_t i;
heapSource = gDvm.gcHeap->heapSource;
*total = heapSource->totalBlocks*BLOCK_SIZE;
@@ -865,39 +862,8 @@
promoteBlockByAddr(gDvm.gcHeap->heapSource, obj);
}
-static void printHeapBitmap(const HeapBitmap *bitmap)
-{
- const char *cp;
- size_t i, length;
-
- length = bitmap->bitsLen >> 2;
- fprintf(stderr, "%p", bitmap->bits);
- for (i = 0; i < length; ++i) {
- fprintf(stderr, " %lx", bitmap->bits[i]);
- fputc('\n', stderr);
- }
-}
-
-static void printHeapBitmapSxS(const HeapBitmap *b1, const HeapBitmap *b2)
-{
- uintptr_t addr;
- size_t i, length;
-
- assert(b1->base == b2->base);
- assert(b1->bitsLen == b2->bitsLen);
- addr = b1->base;
- length = b1->bitsLen >> 2;
- for (i = 0; i < length; ++i) {
- int diff = b1->bits[i] == b2->bits[i];
- fprintf(stderr, "%08x %08lx %08lx %d\n",
- addr, b1->bits[i], b2->bits[i], diff);
- addr += sizeof(*b1->bits)*CHAR_BIT;
- }
-}
-
static size_t sumHeapBitmap(const HeapBitmap *bitmap)
{
- const char *cp;
size_t i, sum;
sum = 0;
@@ -1020,11 +986,6 @@
return GET_CLASS_FLAG_GROUP(obj->clazz, flags);
}
-static int isReference(const Object *obj)
-{
- return getReferenceFlags(obj) != 0;
-}
-
static int isSoftReference(const Object *obj)
{
return getReferenceFlags(obj) == CLASS_ISREFERENCE;
@@ -1437,7 +1398,6 @@
{
ClassObject *clazz;
Object *fromObj, *toObj;
- uintptr_t word;
assert(obj);
@@ -1648,7 +1608,6 @@
static void pinReferenceTable(const ReferenceTable *table)
{
Object **entry;
- int i;
assert(table != NULL);
assert(table->table != NULL);
@@ -1663,7 +1622,6 @@
static void verifyReferenceTable(const ReferenceTable *table)
{
Object **entry;
- int i;
LOG_VER(">>> verifyReferenceTable(table=%p)", table);
for (entry = table->table; entry < table->nextEntry; ++entry) {
@@ -1690,20 +1648,6 @@
}
}
-static void verifyLargeHeapRefTable(LargeHeapRefTable *table, bool stripLowBits)
-{
- for (; table != NULL; table = table->next) {
- Object **ref = table->refs.table;
- for (; ref < table->refs.nextEntry; ++ref) {
- if (stripLowBits) {
- dvmVerifyObject((Object *)((uintptr_t)*ref & ~3));
- } else {
- dvmVerifyObject(*ref);
- }
- }
- }
-}
-
/* This code was copied from Thread.c */
static void scavengeThreadStack(Thread *thread)
{
@@ -2438,7 +2382,6 @@
*/
void dvmScavengeRoots(void) /* Needs a new name badly */
{
- HeapRefTable *refs;
GcHeap *gcHeap;
{
diff --git a/vm/alloc/Verify.c b/vm/alloc/Verify.c
index f70336e..b8ac19f 100644
--- a/vm/alloc/Verify.c
+++ b/vm/alloc/Verify.c
@@ -79,7 +79,6 @@
*/
static void verifyClassObject(const ClassObject *obj)
{
- ClassObject *clazz;
int i;
LOGV("Entering verifyClassObject(obj=%p)", obj);
@@ -138,9 +137,6 @@
*/
static void verifyDataObject(const DataObject *obj)
{
- ClassObject *clazz;
- int i;
-
LOGV("Entering verifyDataObject(obj=%p)", obj);
/* Verify the class object. */
assert(obj->obj.clazz != NULL);