ART: More warnings

Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general,
and -Wunused-but-set-parameter for GCC builds.

Change-Id: I81bbdd762213444673c65d85edae594a523836e5
diff --git a/runtime/gc/collector/mark_compact.cc b/runtime/gc/collector/mark_compact.cc
index 6691b0f..b2482ac 100644
--- a/runtime/gc/collector/mark_compact.cc
+++ b/runtime/gc/collector/mark_compact.cc
@@ -239,7 +239,7 @@
       accounting::ModUnionTable* table = heap_->FindModUnionTableFromSpace(space);
       if (table != nullptr) {
         // TODO: Improve naming.
-        TimingLogger::ScopedTiming t(
+        TimingLogger::ScopedTiming t2(
             space->IsZygoteSpace() ? "UpdateAndMarkZygoteModUnionTable" :
                                      "UpdateAndMarkImageModUnionTable", GetTimings());
         table->UpdateAndMarkReferences(MarkHeapReferenceCallback, this);
@@ -348,7 +348,7 @@
     accounting::ModUnionTable* table = heap_->FindModUnionTableFromSpace(space);
     if (table != nullptr) {
       // TODO: Improve naming.
-      TimingLogger::ScopedTiming t(
+      TimingLogger::ScopedTiming t2(
           space->IsZygoteSpace() ? "UpdateZygoteModUnionTableReferences" :
                                    "UpdateImageModUnionTableReferences",
                                    GetTimings());
@@ -538,7 +538,7 @@
       if (!ShouldSweepSpace(alloc_space)) {
         continue;
       }
-      TimingLogger::ScopedTiming t(
+      TimingLogger::ScopedTiming t2(
           alloc_space->IsZygoteSpace() ? "SweepZygoteSpace" : "SweepAllocSpace", GetTimings());
       RecordFree(alloc_space->Sweep(swap_bitmaps));
     }
diff --git a/runtime/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc
index e3966e3..6ad44e6 100644
--- a/runtime/gc/collector/mark_sweep.cc
+++ b/runtime/gc/collector/mark_sweep.cc
@@ -667,10 +667,10 @@
       Object* obj = nullptr;
       if (kUseMarkStackPrefetch) {
         while (mark_stack_pos_ != 0 && prefetch_fifo.size() < kFifoSize) {
-          Object* obj = mark_stack_[--mark_stack_pos_];
-          DCHECK(obj != nullptr);
-          __builtin_prefetch(obj);
-          prefetch_fifo.push_back(obj);
+          Object* mark_stack_obj = mark_stack_[--mark_stack_pos_];
+          DCHECK(mark_stack_obj != nullptr);
+          __builtin_prefetch(mark_stack_obj);
+          prefetch_fifo.push_back(mark_stack_obj);
         }
         if (UNLIKELY(prefetch_fifo.empty())) {
           break;
@@ -928,7 +928,7 @@
                                                           kVisitRootFlagStopLoggingNewRoots |
                                                           kVisitRootFlagClearRootLog));
   if (kVerifyRootsMarked) {
-    TimingLogger::ScopedTiming t("(Paused)VerifyRoots", GetTimings());
+    TimingLogger::ScopedTiming t2("(Paused)VerifyRoots", GetTimings());
     Runtime::Current()->VisitRoots(VerifyRootMarked, this);
   }
 }
@@ -1057,7 +1057,7 @@
         // if needed.
         if (!mark_bitmap->Test(obj)) {
           if (chunk_free_pos >= kSweepArrayChunkFreeSize) {
-            TimingLogger::ScopedTiming t("FreeList", GetTimings());
+            TimingLogger::ScopedTiming t2("FreeList", GetTimings());
             freed.objects += chunk_free_pos;
             freed.bytes += alloc_space->FreeList(self, chunk_free_pos, chunk_free_buffer);
             chunk_free_pos = 0;
@@ -1069,7 +1069,7 @@
       }
     }
     if (chunk_free_pos > 0) {
-      TimingLogger::ScopedTiming t("FreeList", GetTimings());
+      TimingLogger::ScopedTiming t2("FreeList", GetTimings());
       freed.objects += chunk_free_pos;
       freed.bytes += alloc_space->FreeList(self, chunk_free_pos, chunk_free_buffer);
       chunk_free_pos = 0;
@@ -1099,10 +1099,10 @@
     }
   }
   {
-    TimingLogger::ScopedTiming t("RecordFree", GetTimings());
+    TimingLogger::ScopedTiming t2("RecordFree", GetTimings());
     RecordFree(freed);
     RecordFreeLOS(freed_los);
-    t.NewTiming("ResetStack");
+    t2.NewTiming("ResetStack");
     allocations->Reset();
   }
   sweep_array_free_buffer_mem_map_->MadviseDontNeedAndZero();
@@ -1218,10 +1218,10 @@
       Object* obj = NULL;
       if (kUseMarkStackPrefetch) {
         while (!mark_stack_->IsEmpty() && prefetch_fifo.size() < kFifoSize) {
-          Object* obj = mark_stack_->PopBack();
-          DCHECK(obj != NULL);
-          __builtin_prefetch(obj);
-          prefetch_fifo.push_back(obj);
+          Object* mark_stack_obj = mark_stack_->PopBack();
+          DCHECK(mark_stack_obj != NULL);
+          __builtin_prefetch(mark_stack_obj);
+          prefetch_fifo.push_back(mark_stack_obj);
         }
         if (prefetch_fifo.empty()) {
           break;
diff --git a/runtime/gc/collector/semi_space.cc b/runtime/gc/collector/semi_space.cc
index e141b6f..cb9f111 100644
--- a/runtime/gc/collector/semi_space.cc
+++ b/runtime/gc/collector/semi_space.cc
@@ -224,7 +224,7 @@
   // Need to do this before the checkpoint since we don't want any threads to add references to
   // the live stack during the recursive mark.
   if (kUseThreadLocalAllocationStack) {
-    TimingLogger::ScopedTiming t("RevokeAllThreadLocalAllocationStacks", GetTimings());
+    TimingLogger::ScopedTiming t2("RevokeAllThreadLocalAllocationStacks", GetTimings());
     heap_->RevokeAllThreadLocalAllocationStacks(self_);
   }
   heap_->SwapStacks(self_);
@@ -368,7 +368,7 @@
   CHECK_EQ(is_large_object_space_immune_, collect_from_space_only_);
   space::LargeObjectSpace* los = GetHeap()->GetLargeObjectsSpace();
   if (is_large_object_space_immune_ && los != nullptr) {
-    TimingLogger::ScopedTiming t("VisitLargeObjects", GetTimings());
+    TimingLogger::ScopedTiming t2("VisitLargeObjects", GetTimings());
     DCHECK(collect_from_space_only_);
     // Delay copying the live set to the marked set until here from
     // BindBitmaps() as the large objects on the allocation stack may