Fix a bunch more lint.

(If you ignore the compilers, we've got relatively little lint now. Fits on
a single screen.)

Change-Id: I51389002894d4fd8cf46f79d2bac57079322a030
diff --git a/src/card_table.h b/src/card_table.h
index 6ef6ced..d61a47e 100644
--- a/src/card_table.h
+++ b/src/card_table.h
@@ -38,7 +38,6 @@
 // WriteBarrier, and from there to here.
 class CardTable {
  public:
-
   static CardTable* Create(const byte* heap_begin, size_t heap_capacity);
 
   // Set the card associated with the given address to GC_CARD_DIRTY.
diff --git a/src/common_test.h b/src/common_test.h
index 52c3393..fbd8b5b 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -49,11 +49,11 @@
   255, 255, 255, 255, 255, 255, 255,  62, 255, 255, 255,  63,
   52,  53,  54,  55,  56,  57,  58,  59,  60,  61, 255, 255,
   255, 254, 255, 255, 255,   0,   1,   2,   3,   4,   5,   6,
-    7,   8,   9,  10,  11,  12,  13,  14,  15,  16,  17,  18,
-   19,  20,  21,  22,  23,  24,  25, 255, 255, 255, 255, 255,
+    7,   8,   9,  10,  11,  12,  13,  14,  15,  16,  17,  18, // NOLINT
+   19,  20,  21,  22,  23,  24,  25, 255, 255, 255, 255, 255, // NOLINT
   255,  26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,
-   37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47,  48,
-   49,  50,  51, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+   37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47,  48, // NOLINT
+   49,  50,  51, 255, 255, 255, 255, 255, 255, 255, 255, 255, // NOLINT
   255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
   255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
   255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
@@ -69,7 +69,7 @@
 
 byte* DecodeBase64(const char* src, size_t* dst_size) {
   std::vector<byte> tmp;
-  unsigned long t = 0, y = 0;
+  uint32_t t = 0, y = 0;
   int g = 3;
   for (size_t i = 0; src[i] != '\0'; ++i) {
     byte c = kBase64Map[src[i] & 0xFF];
@@ -172,7 +172,6 @@
 
 class CommonTest : public testing::Test {
  public:
-
   static void MakeExecutable(const ByteArray* code_array) {
     CHECK(code_array != NULL);
     MakeExecutable(code_array->GetData(), code_array->GetLength());
diff --git a/src/compiler.cc b/src/compiler.cc
index aa465c3..8e24fc2 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1298,7 +1298,7 @@
   }
 
   void SwitchToDexFile(size_t dex_file_index) {
-    CHECK (dex_file_index < dex_files_.size());
+    CHECK_LT(dex_file_index, dex_files_.size());
 
     const DexFile* dex_file = dex_files_[dex_file_index];
     CHECK(dex_file != NULL);
diff --git a/src/compiler.h b/src/compiler.h
index 5a46de6..b36d807 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -248,7 +248,6 @@
   }
 
  private:
-
   // Compute constant code and method pointers when possible
   void GetCodeAndMethodForDirectCall(InvokeType type, InvokeType sharp_type, Method* method,
                                      uintptr_t& direct_code, uintptr_t& direct_method);
diff --git a/src/compiler_test.cc b/src/compiler_test.cc
index d59576d..e3faa3b 100644
--- a/src/compiler_test.cc
+++ b/src/compiler_test.cc
@@ -31,7 +31,6 @@
 
 class CompilerTest : public CommonTest {
  protected:
-
   void CompileAll(const ClassLoader* class_loader) {
     compiler_->CompileAll(class_loader, Runtime::Current()->GetCompileTimeClassPath(class_loader));
     MakeAllExecutable(class_loader);
diff --git a/src/dex2oat.cc b/src/dex2oat.cc
index e9acbad..f2c73e9 100644
--- a/src/dex2oat.cc
+++ b/src/dex2oat.cc
@@ -118,7 +118,6 @@
 
 class Dex2Oat {
  public:
-
   static Dex2Oat* Create(Runtime::Options& options, InstructionSet instruction_set,
                          size_t thread_count, bool support_debugging) {
     UniquePtr<Runtime> runtime(CreateRuntime(options, instruction_set));
@@ -278,7 +277,6 @@
   }
 
  private:
-
   explicit Dex2Oat(Runtime* runtime, InstructionSet instruction_set, size_t thread_count,
                    bool support_debugging)
       : instruction_set_(instruction_set),
diff --git a/src/dex_cache.h b/src/dex_cache.h
index 2560638..f604701 100644
--- a/src/dex_cache.h
+++ b/src/dex_cache.h
@@ -141,7 +141,6 @@
   }
 
  private:
-
   enum ArrayIndex {
     kLocation                 = 0,
     kStrings                  = 1,
@@ -157,6 +156,7 @@
     DCHECK(obj != NULL);
     return obj;
   }
+
   DISALLOW_IMPLICIT_CONSTRUCTORS(DexCache);
 };
 
diff --git a/src/dex_file.h b/src/dex_file.h
index 708e9fd..668e695 100644
--- a/src/dex_file.h
+++ b/src/dex_file.h
@@ -76,6 +76,7 @@
     uint32_t class_defs_off_;  // file offset of ClassDef array
     uint32_t data_size_;  // unused
     uint32_t data_off_;  // unused
+
    private:
     DISALLOW_COPY_AND_ASSIGN(Header);
   };
@@ -107,6 +108,7 @@
     uint16_t unused_;
     uint32_t size_;
     uint32_t offset_;
+
    private:
     DISALLOW_COPY_AND_ASSIGN(MapItem);
   };
@@ -114,6 +116,7 @@
   struct MapList {
     uint32_t size_;
     MapItem list_[1];
+
    private:
     DISALLOW_COPY_AND_ASSIGN(MapList);
   };
@@ -121,6 +124,7 @@
   // Raw string_id_item.
   struct StringId {
     uint32_t string_data_off_;  // offset in bytes from the base address
+
    private:
     DISALLOW_COPY_AND_ASSIGN(StringId);
   };
@@ -128,6 +132,7 @@
   // Raw type_id_item.
   struct TypeId {
     uint32_t descriptor_idx_;  // index into string_ids
+
    private:
     DISALLOW_COPY_AND_ASSIGN(TypeId);
   };
@@ -137,6 +142,7 @@
     uint16_t class_idx_;  // index into type_ids_ array for defining class
     uint16_t type_idx_;  // index into type_ids_ array for field type
     uint32_t name_idx_;  // index into string_ids_ array for field name
+
    private:
     DISALLOW_COPY_AND_ASSIGN(FieldId);
   };
@@ -146,6 +152,7 @@
     uint16_t class_idx_;  // index into type_ids_ array for defining class
     uint16_t proto_idx_;  // index into proto_ids_ array for method prototype
     uint32_t name_idx_;  // index into string_ids_ array for method name
+
    private:
     DISALLOW_COPY_AND_ASSIGN(MethodId);
   };
@@ -156,6 +163,7 @@
     uint16_t return_type_idx_;  // index into type_ids array for return type
     uint16_t pad_;             // padding = 0
     uint32_t parameters_off_;  // file offset to type_list for parameter types
+
    private:
     DISALLOW_COPY_AND_ASSIGN(ProtoId);
   };
@@ -172,6 +180,7 @@
     uint32_t annotations_off_;  // file offset to annotations_directory_item
     uint32_t class_data_off_;  // file offset to class_data_item
     uint32_t static_values_off_;  // file offset to EncodedArray
+
    private:
     DISALLOW_COPY_AND_ASSIGN(ClassDef);
   };
@@ -179,6 +188,7 @@
   // Raw type_item.
   struct TypeItem {
     uint16_t type_idx_;  // index into type_ids section
+
    private:
     DISALLOW_COPY_AND_ASSIGN(TypeItem);
   };
@@ -210,6 +220,7 @@
     uint32_t debug_info_off_;  // file offset to debug info stream
     uint32_t insns_size_in_code_units_;  // size of the insns array, in 2 byte code units
     uint16_t insns_[1];
+
    private:
     DISALLOW_COPY_AND_ASSIGN(CodeItem);
   };
@@ -219,6 +230,7 @@
     uint32_t start_addr_;
     uint16_t insn_count_;
     uint16_t handler_off_;
+
    private:
     DISALLOW_COPY_AND_ASSIGN(TryItem);
   };
@@ -255,6 +267,7 @@
     uint32_t fields_size_;
     uint32_t methods_size_;
     uint32_t parameters_size_;
+
    private:
     DISALLOW_COPY_AND_ASSIGN(AnnotationsDirectoryItem);
   };
@@ -262,6 +275,7 @@
   struct FieldAnnotationsItem {
     uint32_t field_idx_;
     uint32_t annotations_off_;
+
    private:
     DISALLOW_COPY_AND_ASSIGN(FieldAnnotationsItem);
   };
@@ -269,6 +283,7 @@
   struct MethodAnnotationsItem {
     uint32_t method_idx_;
     uint32_t annotations_off_;
+
    private:
     DISALLOW_COPY_AND_ASSIGN(MethodAnnotationsItem);
   };
@@ -276,12 +291,14 @@
   struct ParameterAnnotationsItem {
     uint32_t method_idx_;
     uint32_t annotations_off_;
+
    private:
     DISALLOW_COPY_AND_ASSIGN(ParameterAnnotationsItem);
   };
 
   struct AnnotationSetRefItem {
     uint32_t annotations_off_;
+
    private:
     DISALLOW_COPY_AND_ASSIGN(AnnotationSetRefItem);
   };
@@ -289,6 +306,7 @@
   struct AnnotationSetRefList {
     uint32_t size_;
     AnnotationSetRefItem list_[1];
+
    private:
     DISALLOW_COPY_AND_ASSIGN(AnnotationSetRefList);
   };
@@ -296,6 +314,7 @@
   struct AnnotationSetItem {
     uint32_t size_;
     uint32_t entries_[1];
+
    private:
     DISALLOW_COPY_AND_ASSIGN(AnnotationSetItem);
   };
@@ -303,6 +322,7 @@
   struct AnnotationItem {
     uint8_t visibility_;
     uint8_t annotation_[1];
+
    private:
     DISALLOW_COPY_AND_ASSIGN(AnnotationItem);
   };
@@ -770,7 +790,6 @@
   void ChangePermissions(int prot) const;
 
  private:
-
   // Opens a .dex file
   static const DexFile* OpenFile(const std::string& filename,
                                  const std::string& location,
@@ -1008,6 +1027,7 @@
     CHECK(!HasNext());
     return ptr_pos_;
   }
+
  private:
   // A dex file's class_data_item is leb128 encoded, this structure holds a decoded form of the
   // header for a class_data_item
@@ -1039,6 +1059,7 @@
     uint32_t field_idx_delta_;  // delta of index into the field_ids array for FieldId
     uint32_t access_flags_;  // access flags for the field
     ClassDataField() :  field_idx_delta_(0), access_flags_(0) {}
+
    private:
     DISALLOW_COPY_AND_ASSIGN(ClassDataField);
   };
@@ -1053,6 +1074,7 @@
     uint32_t access_flags_;
     uint32_t code_off_;
     ClassDataMethod() : method_idx_delta_(0), access_flags_(0), code_off_(0) {}
+
    private:
     DISALLOW_COPY_AND_ASSIGN(ClassDataMethod);
   };
@@ -1082,6 +1104,7 @@
   bool HasNext() { return pos_ < array_size_; }
 
   void Next();
+
  private:
   enum ValueType {
     kByte = 0x00,
@@ -1142,6 +1165,7 @@
       CHECK(!HasNext());
       return current_data_;
     }
+
   private:
     void Init(const DexFile::CodeItem& code_item, int32_t offset);
     void Init(const byte* handler_data);
diff --git a/src/hprof/hprof.cc b/src/hprof/hprof.cc
index 03e3a6c..d59d179 100644
--- a/src/hprof/hprof.cc
+++ b/src/hprof/hprof.cc
@@ -163,8 +163,8 @@
 typedef HprofId HprofStringId;
 typedef HprofId HprofObjectId;
 typedef HprofId HprofClassObjectId;
-typedef std::set<Class*> ClassSet;
-typedef std::set<Class*>::iterator ClassSetIterator;
+typedef std::set<const Class*> ClassSet;
+typedef std::set<const Class*>::iterator ClassSetIterator;
 typedef SafeMap<std::string, size_t> StringMap;
 typedef SafeMap<std::string, size_t>::iterator StringMapIterator;
 
@@ -177,7 +177,7 @@
  public:
   int Flush(FILE* fp) {
     if (dirty_) {
-      unsigned char headBuf[sizeof (uint8_t) + 2 * sizeof (uint32_t)];
+      unsigned char headBuf[sizeof(uint8_t) + 2 * sizeof(uint32_t)];
 
       headBuf[0] = tag_;
       U4_TO_BUF_BE(headBuf, 1, time_);
@@ -334,11 +334,11 @@
   int StartNewRecord(uint8_t tag, uint32_t time);
   int FlushCurrentRecord();
   int MarkRootObject(const Object *obj, jobject jniObj);
-  HprofClassObjectId LookupClassId(Class* c);
+  HprofClassObjectId LookupClassId(const Class* c);
   HprofStringId LookupStringId(String* string);
   HprofStringId LookupStringId(const char* string);
   HprofStringId LookupStringId(const std::string& string);
-  HprofStringId LookupClassNameId(Class* c);
+  HprofStringId LookupClassNameId(const Class* c);
 
   // current_record_ *must* be first so that we can cast from a context to a record.
   HprofRecord current_record_;
@@ -652,7 +652,7 @@
     // allocated which hasn't been initialized yet.
   } else {
     if (obj->IsClass()) {
-      Class* thisClass = (Class*)obj;
+      const Class* thisClass = obj->AsClass();
       // obj is a ClassObject.
       size_t sFieldCount = thisClass->NumStaticFields();
       if (sFieldCount != 0) {
@@ -734,7 +734,7 @@
         rec->AddU1(t);
       }
     } else if (c->IsArrayClass()) {
-      Array *aobj = (Array *)obj;
+      const Array* aobj = obj->AsArray();
       uint32_t length = aobj->GetLength();
 
       if (obj->IsObjectArray()) {
@@ -778,7 +778,6 @@
 #endif
       }
     } else {
-
       // obj is an instance object.
       rec->AddU1(HPROF_INSTANCE_DUMP);
       rec->AddId((HprofObjectId)obj);
@@ -1005,18 +1004,18 @@
   return 0;
 }
 
-HprofStringId Hprof::LookupClassNameId(Class* c) {
+HprofStringId Hprof::LookupClassNameId(const Class* c) {
   return LookupStringId(PrettyDescriptor(c));
 }
 
-HprofClassObjectId Hprof::LookupClassId(Class* c) {
+HprofClassObjectId Hprof::LookupClassId(const Class* c) {
   if (c == NULL) {
     // c is the superclass of java.lang.Object or a primitive
     return (HprofClassObjectId)0;
   }
 
   std::pair<ClassSetIterator, bool> result = classes_.insert(c);
-  Class* present = *result.first;
+  const Class* present = *result.first;
 
   // Make sure that we've assigned a string ID for this class' name
   LookupClassNameId(c);
@@ -1030,7 +1029,7 @@
   uint32_t nextSerialNumber = 1;
 
   for (ClassSetIterator it = classes_.begin(); it != classes_.end(); ++it) {
-    Class* c = *it;
+    const Class* c = *it;
     CHECK(c != NULL);
 
     int err = StartNewRecord(HPROF_TAG_LOAD_CLASS, HPROF_TIME);
@@ -1054,14 +1053,14 @@
 
 static void HprofRootVisitor(const Object* obj, void* arg) {
   CHECK(arg != NULL);
-  Hprof* hprof = (Hprof*)arg;
+  Hprof* hprof = reinterpret_cast<Hprof*>(arg);
   hprof->VisitRoot(obj);
 }
 
 static void HprofBitmapCallback(Object *obj, void *arg) {
   CHECK(obj != NULL);
   CHECK(arg != NULL);
-  Hprof *hprof = (Hprof*)arg;
+  Hprof* hprof = reinterpret_cast<Hprof*>(arg);
   hprof->DumpHeapObject(obj);
 }
 
diff --git a/src/image_writer.h b/src/image_writer.h
index 5f78863..1dc5b66 100644
--- a/src/image_writer.h
+++ b/src/image_writer.h
@@ -49,8 +49,8 @@
              const std::string& oat_filename,
              const std::string& oat_location,
              const Compiler& compiler);
- private:
 
+ private:
   bool AllocMemory();
 
   // we use the lock word to store the offset of the object in the image
diff --git a/src/jdwp/jdwp.h b/src/jdwp/jdwp.h
index 7940566..8534c8e 100644
--- a/src/jdwp/jdwp.h
+++ b/src/jdwp/jdwp.h
@@ -214,6 +214,9 @@
    */
   bool PostVMDeath();
 
+  // Called if/when we realize we're talking to DDMS.
+  void NotifyDdmsActive();
+
   /*
    * Send up a chunk of DDM data.
    */
@@ -276,59 +279,50 @@
 
  public: // TODO: fix privacy
   const JdwpOptions* options_;
- private:
 
+ private:
   /* wait for creation of the JDWP thread */
   Mutex thread_start_lock_;
   ConditionVariable thread_start_cond_;
 
-  volatile int32_t debug_thread_started_;
   pthread_t pthread_;
   Thread* thread_;
- public: // TODO: fix privacy
-  ObjectId debugThreadId;
+
+  volatile int32_t debug_thread_started_;
+  ObjectId debug_thread_id_;
+
  private:
   bool run;
+  const JdwpTransport* transport_;
 
-  const JdwpTransport* transport;
  public: // TODO: fix privacy
   JdwpNetState* netState;
- private:
 
-  /* for wait-for-debugger */
+ private:
+  // For wait-for-debugger.
   Mutex attach_lock_;
   ConditionVariable attach_cond_;
 
-  /* time of last debugger activity, in milliseconds */
-  int64_t lastActivityWhen;
+  // Time of last debugger activity, in milliseconds.
+  int64_t last_activity_time_ms_;
 
-  /* global counters and a mutex to protect them */
+  // Global counters and a mutex to protect them.
   Mutex serial_lock_;
   uint32_t request_serial_ GUARDED_BY(serial_lock_);
   uint32_t event_serial_ GUARDED_BY(serial_lock_);
 
-  /*
-   * Events requested by the debugger (breakpoints, class prep, etc).
-   */
- public: // TODO: fix privacy
+  // Linked list of events requested by the debugger (breakpoints, class prep, etc).
   Mutex event_list_lock_;
-  JdwpEvent* event_list_ GUARDED_BY(event_list_lock_); // Linked list of events.
+  JdwpEvent* event_list_ GUARDED_BY(event_list_lock_);
   int event_list_size_ GUARDED_BY(event_list_lock_); // Number of elements in event_list_.
- private:
 
-  /*
-   * Synchronize suspension of event thread (to avoid receiving "resume"
-   * events before the thread has finished suspending itself).
-   */
+  // Used to synchronize suspension of the event thread (to avoid receiving "resume"
+  // events before the thread has finished suspending itself).
   Mutex event_thread_lock_;
   ConditionVariable event_thread_cond_;
-  ObjectId eventThreadId;
+  ObjectId event_thread_id_;
 
-  /*
-   * DDM support.
-   */
- public: // TODO: fix privacy
-  bool ddmActive;
+  bool ddm_is_active_;
 };
 
 }  // namespace JDWP
diff --git a/src/jdwp/jdwp_adb.cc b/src/jdwp/jdwp_adb.cc
index 4577b59..6bc7820 100644
--- a/src/jdwp/jdwp_adb.cc
+++ b/src/jdwp/jdwp_adb.cc
@@ -190,7 +190,7 @@
 
   /* first, ensure that we get a connection to the ADB daemon */
 
-retry:
+ retry:
   if (netState->shuttingDown) {
     return false;
   }
@@ -240,10 +240,7 @@
 #endif
 
         /* now try to send our pid to the ADB daemon */
-        do {
-          ret = send( netState->controlSock, buff, 4, 0 );
-        } while (ret < 0 && errno == EINTR);
-
+        ret = TEMP_FAILURE_RETRY(send(netState->controlSock, buff, 4, 0));
         if (ret >= 0) {
           VLOG(jdwp) << StringPrintf("PID sent as '%.*s' to ADB", 4, buff);
           break;
@@ -256,7 +253,7 @@
         PLOG(ERROR) << "Can't connect to ADB control socket";
       }
 
-      usleep( sleep_ms*1000 );
+      usleep(sleep_ms * 1000);
 
       sleep_ms += (sleep_ms >> 1);
       if (sleep_ms > sleep_max_ms) {
@@ -291,7 +288,7 @@
 /*
  * Connect out to a debugger (for server=n).  Not required.
  */
-static bool establishConnection(JdwpState*) {
+static bool establishConnection(JdwpState*, const JdwpOptions*) {
   return false;
 }
 
@@ -627,7 +624,7 @@
    */
   return handlePacket(state);
 
-fail:
+ fail:
   closeConnection(state);
   return false;
 }
diff --git a/src/jdwp/jdwp_event.cc b/src/jdwp/jdwp_event.cc
index f398066..841ee8c 100644
--- a/src/jdwp/jdwp_event.cc
+++ b/src/jdwp/jdwp_event.cc
@@ -503,7 +503,7 @@
   }
 
   /* this is rare but possible -- see CLASS_PREPARE handling */
-  if (Dbg::GetThreadSelfId() == debugThreadId) {
+  if (Dbg::GetThreadSelfId() == debug_thread_id_) {
     LOG(INFO) << "NOTE: SuspendByPolicy not suspending JDWP thread";
     return;
   }
@@ -572,8 +572,8 @@
    * If another thread is already doing stuff, wait for it.  This can
    * go to sleep indefinitely.
    */
-  while (eventThreadId != 0) {
-    VLOG(jdwp) << StringPrintf("event in progress (%#llx), %#llx sleeping", eventThreadId, threadId);
+  while (event_thread_id_ != 0) {
+    VLOG(jdwp) << StringPrintf("event in progress (%#llx), %#llx sleeping", event_thread_id_, threadId);
     waited = true;
     event_thread_cond_.Wait(event_thread_lock_);
   }
@@ -582,7 +582,7 @@
     VLOG(jdwp) << StringPrintf("event token grabbed (%#llx)", threadId);
   }
   if (threadId != 0) {
-    eventThreadId = threadId;
+    event_thread_id_ = threadId;
   }
 }
 
@@ -597,10 +597,10 @@
    */
   MutexLock mu(event_thread_lock_);
 
-  CHECK_NE(eventThreadId, 0U);
-  VLOG(jdwp) << StringPrintf("cleared event token (%#llx)", eventThreadId);
+  CHECK_NE(event_thread_id_, 0U);
+  VLOG(jdwp) << StringPrintf("cleared event token (%#llx)", event_thread_id_);
 
-  eventThreadId = 0;
+  event_thread_id_ = 0;
 
   event_thread_cond_.Signal();
 }
@@ -722,7 +722,7 @@
    * while doing so.  (I don't think we currently do this at all, so
    * this is mostly paranoia.)
    */
-  if (basket.threadId == debugThreadId) {
+  if (basket.threadId == debug_thread_id_) {
     VLOG(jdwp) << "Ignoring location event in JDWP thread";
     return false;
   }
@@ -1018,7 +1018,7 @@
       suspend_policy = scanSuspendPolicy(match_list, match_count);
       VLOG(jdwp) << "  suspend_policy=" << suspend_policy;
 
-      if (basket.threadId == debugThreadId) {
+      if (basket.threadId == debug_thread_id_) {
         /*
          * JDWP says that, for a class prep in the debugger thread, we
          * should set threadId to null and if any threads were supposed
@@ -1106,7 +1106,7 @@
    * Make sure we're in VMWAIT in case the write blocks.
    */
   int old_state = Dbg::ThreadWaiting();
-  (*transport->sendBufferedRequest)(this, wrapiov, iov_count + 1);
+  (*transport_->sendBufferedRequest)(this, wrapiov, iov_count + 1);
   Dbg::ThreadContinuing(old_state);
 }
 
diff --git a/src/jdwp/jdwp_expand_buf.cc b/src/jdwp/jdwp_expand_buf.cc
index 307167e..523c9d7 100644
--- a/src/jdwp/jdwp_expand_buf.cc
+++ b/src/jdwp/jdwp_expand_buf.cc
@@ -44,13 +44,10 @@
  * Allocate a JdwpBuf and some initial storage.
  */
 ExpandBuf* expandBufAlloc() {
-  ExpandBuf* newBuf;
-
-  newBuf = (ExpandBuf*) malloc(sizeof(*newBuf));
-  newBuf->storage = (uint8_t*) malloc(kInitialStorage);
+  ExpandBuf* newBuf = new ExpandBuf;
+  newBuf->storage = reinterpret_cast<uint8_t*>(malloc(kInitialStorage));
   newBuf->curLen = 0;
   newBuf->maxLen = kInitialStorage;
-
   return newBuf;
 }
 
@@ -63,7 +60,7 @@
   }
 
   free(pBuf->storage);
-  free(pBuf);
+  delete pBuf;
 }
 
 /*
@@ -80,7 +77,6 @@
   return pBuf->curLen;
 }
 
-
 /*
  * Ensure that the buffer has enough space to hold incoming data.  If it
  * doesn't, resize the buffer.
@@ -94,7 +90,7 @@
     pBuf->maxLen *= 2;
   }
 
-  uint8_t* newPtr = (uint8_t*) realloc(pBuf->storage, pBuf->maxLen);
+  uint8_t* newPtr = reinterpret_cast<uint8_t*>(realloc(pBuf->storage, pBuf->maxLen));
   if (newPtr == NULL) {
     LOG(FATAL) << "realloc(" << pBuf->maxLen << ") failed";
   }
diff --git a/src/jdwp/jdwp_handler.cc b/src/jdwp/jdwp_handler.cc
index f873da2..95d4c09 100644
--- a/src/jdwp/jdwp_handler.cc
+++ b/src/jdwp/jdwp_handler.cc
@@ -1425,13 +1425,7 @@
 
   VLOG(jdwp) << StringPrintf("  Handling DDM packet (%.4s)", buf);
 
-  /*
-   * On first DDM packet, notify all handlers that DDM is running.
-   */
-  if (!state->ddmActive) {
-    state->ddmActive = true;
-    Dbg::DdmConnected();
-  }
+  state->NotifyDdmsActive();
 
   /*
    * If they want to send something back, we copy it into the buffer.
@@ -1628,7 +1622,7 @@
      * so waitForDebugger() doesn't return if we stall for a bit here.
      */
     Dbg::GoActive();
-    QuasiAtomic::Swap64(0, &lastActivityWhen);
+    QuasiAtomic::Swap64(0, &last_activity_time_ms_);
   }
 
   /*
@@ -1697,7 +1691,7 @@
    * the initial setup.  Only update if this is a non-DDMS packet.
    */
   if (pHeader->cmdSet != kJDWPDdmCmdSet) {
-    QuasiAtomic::Swap64(MilliTime(), &lastActivityWhen);
+    QuasiAtomic::Swap64(MilliTime(), &last_activity_time_ms_);
   }
 
   /* tell the VM that GC is okay again */
diff --git a/src/jdwp/jdwp_main.cc b/src/jdwp/jdwp_main.cc
index 20b770f..3a4d398 100644
--- a/src/jdwp/jdwp_main.cc
+++ b/src/jdwp/jdwp_main.cc
@@ -59,11 +59,11 @@
 }
 
 bool JdwpState::IsConnected() {
-  return (*transport->isConnected)(this);
+  return (*transport_->isConnected)(this);
 }
 
 bool JdwpState::SendRequest(ExpandBuf* pReq) {
-  return (*transport->sendRequest)(this, pReq);
+  return (*transport_->sendRequest)(this, pReq);
 }
 
 /*
@@ -89,13 +89,13 @@
       thread_start_lock_("JDWP thread start lock"),
       thread_start_cond_("JDWP thread start condition variable"),
       debug_thread_started_(false),
-      debugThreadId(0),
+      debug_thread_id_(0),
       run(false),
-      transport(NULL),
+      transport_(NULL),
       netState(NULL),
       attach_lock_("JDWP attach lock"),
       attach_cond_("JDWP attach condition variable"),
-      lastActivityWhen(0),
+      last_activity_time_ms_(0),
       serial_lock_("JDWP serial lock"),
       request_serial_(0x10000000),
       event_serial_(0x20000000),
@@ -104,8 +104,8 @@
       event_list_size_(0),
       event_thread_lock_("JDWP event thread lock"),
       event_thread_cond_("JDWP event thread condition variable"),
-      eventThreadId(0),
-      ddmActive(false) {
+      event_thread_id_(0),
+      ddm_is_active_(false) {
 }
 
 /*
@@ -119,19 +119,19 @@
   switch (options->transport) {
   case kJdwpTransportSocket:
     // LOGD("prepping for JDWP over TCP");
-    state->transport = SocketTransport();
+    state->transport_ = SocketTransport();
     break;
 #ifdef HAVE_ANDROID_OS
   case kJdwpTransportAndroidAdb:
     // LOGD("prepping for JDWP over ADB");
-    state->transport = AndroidAdbTransport();
+    state->transport_ = AndroidAdbTransport();
     break;
 #endif
   default:
     LOG(FATAL) << "Unknown transport: " << options->transport;
   }
 
-  if (!(*state->transport->startup)(state.get(), options)) {
+  if (!(*state->transport_->startup)(state.get(), options)) {
     return NULL;
   }
 
@@ -211,7 +211,7 @@
    * Should not have one of these in progress.  If the debugger went away
    * mid-request, though, we could see this.
    */
-  if (eventThreadId != 0) {
+  if (event_thread_id_ != 0) {
     LOG(WARNING) << "Resetting state while event in progress";
     DCHECK(false);
   }
@@ -221,7 +221,7 @@
  * Tell the JDWP thread to shut down.  Frees "state".
  */
 JdwpState::~JdwpState() {
-  if (transport != NULL) {
+  if (transport_ != NULL) {
     if (IsConnected()) {
       PostVMDeath();
     }
@@ -230,7 +230,7 @@
      * Close down the network to inspire the thread to halt.
      */
     VLOG(jdwp) << "JDWP shutting down net...";
-    (*transport->shutdown)(this);
+    (*transport_->shutdown)(this);
 
     if (debug_thread_started_) {
       run = false;
@@ -241,7 +241,7 @@
     }
 
     VLOG(jdwp) << "JDWP freeing netstate...";
-    (*transport->free)(this);
+    (*transport_->free)(this);
     netState = NULL;
   }
   CHECK(netState == NULL);
@@ -303,7 +303,7 @@
        * Block forever, waiting for a connection.  To support the
        * "timeout=xxx" option we'll need to tweak this.
        */
-      if (!(*transport->accept)(this)) {
+      if (!(*transport_->accept)(this)) {
         break;
       }
     } else {
@@ -313,7 +313,7 @@
        * have a timeout if the handshake reply isn't received in a
        * reasonable amount of time.
        */
-      if (!(*transport->establish)(this)) {
+      if (!(*transport_->establish)(this, options_)) {
         /* wake anybody who was waiting for us to succeed */
         MutexLock mu(attach_lock_);
         attach_cond_.Broadcast();
@@ -333,17 +333,17 @@
         Dbg::ThreadWaiting();
       }
 
-      if (!(*transport->processIncoming)(this)) {
+      if (!(*transport_->processIncoming)(this)) {
         /* blocking read */
         break;
       }
 
-      if (first && !(*transport->awaitingHandshake)(this)) {
+      if (first && !(*transport_->awaitingHandshake)(this)) {
         /* handshake worked, tell the interpreter that we're active */
         first = false;
 
         /* set thread ID; requires object registry to be active */
-        debugThreadId = Dbg::GetThreadSelfId();
+        debug_thread_id_ = Dbg::GetThreadSelfId();
 
         /* wake anybody who's waiting for us */
         MutexLock mu(attach_lock_);
@@ -351,10 +351,10 @@
       }
     }
 
-    (*transport->close)(this);
+    (*transport_->close)(this);
 
-    if (ddmActive) {
-      ddmActive = false;
+    if (ddm_is_active_) {
+      ddm_is_active_ = false;
 
       /* broadcast the disconnect; must be in RUNNING state */
       Dbg::ThreadRunning();
@@ -384,6 +384,13 @@
   runtime->DetachCurrentThread();
 }
 
+void JdwpState::NotifyDdmsActive() {
+  if (!ddm_is_active_) {
+    ddm_is_active_ = true;
+    Dbg::DdmConnected();
+  }
+}
+
 Thread* JdwpState::GetDebugThread() {
   return thread_;
 }
@@ -420,7 +427,7 @@
     return -1;
   }
 
-  int64_t last = QuasiAtomic::Read64(&lastActivityWhen);
+  int64_t last = QuasiAtomic::Read64(&last_activity_time_ms_);
 
   /* initializing or in the middle of something? */
   if (last == 0) {
diff --git a/src/jdwp/jdwp_priv.h b/src/jdwp/jdwp_priv.h
index 98ae3b9..cead61a 100644
--- a/src/jdwp/jdwp_priv.h
+++ b/src/jdwp/jdwp_priv.h
@@ -55,7 +55,7 @@
 struct JdwpTransport {
   bool (*startup)(JdwpState* state, const JdwpOptions* options);
   bool (*accept)(JdwpState* state);
-  bool (*establish)(JdwpState* state);
+  bool (*establish)(JdwpState* state, const JdwpOptions* options);
   void (*close)(JdwpState* state);
   void (*shutdown)(JdwpState* state);
   void (*free)(JdwpState* state);
diff --git a/src/jdwp/jdwp_socket.cc b/src/jdwp/jdwp_socket.cc
index 4424e7b..1cd610b 100644
--- a/src/jdwp/jdwp_socket.cc
+++ b/src/jdwp/jdwp_socket.cc
@@ -177,7 +177,7 @@
 
   return netState;
 
-fail:
+ fail:
   netShutdown(netState);
   netFree(netState);
   return NULL;
@@ -332,7 +332,7 @@
 /*
  * Create a connection to a waiting debugger.
  */
-static bool establishConnection(JdwpState* state) {
+static bool establishConnection(JdwpState* state, const JdwpOptions* options) {
   union {
     sockaddr_in  addrInet;
     sockaddr     addrPlain;
@@ -340,9 +340,9 @@
   hostent* pEntry;
 
   CHECK(state != NULL && state->netState != NULL);
-  CHECK(!state->options_->server);
-  CHECK(!state->options_->host.empty());
-  CHECK_NE(state->options_->port, 0);
+  CHECK(!options->server);
+  CHECK(!options->host.empty());
+  CHECK_NE(options->port, 0);
 
   /*
    * Start by resolving the host name.
@@ -353,16 +353,16 @@
   hostent he;
   char auxBuf[128];
   int error;
-  int cc = gethostbyname_r(state->options_->host.c_str(), &he, auxBuf, sizeof(auxBuf), &pEntry, &error);
+  int cc = gethostbyname_r(options->host.c_str(), &he, auxBuf, sizeof(auxBuf), &pEntry, &error);
   if (cc != 0) {
-    LOG(WARNING) << "gethostbyname_r('" << state->options_->host << "') failed: " << hstrerror(error);
+    LOG(WARNING) << "gethostbyname_r('" << options->host << "') failed: " << hstrerror(error);
     return false;
   }
 #else
   h_errno = 0;
-  pEntry = gethostbyname(state->options_->host.c_str());
+  pEntry = gethostbyname(options->host.c_str());
   if (pEntry == NULL) {
-    PLOG(WARNING) << "gethostbyname('" << state->options_->host << "') failed";
+    PLOG(WARNING) << "gethostbyname('" << options->host << "') failed";
     return false;
   }
 #endif
@@ -371,7 +371,7 @@
   memcpy(&addr.addrInet.sin_addr, pEntry->h_addr, pEntry->h_length);
   addr.addrInet.sin_family = pEntry->h_addrtype;
 
-  addr.addrInet.sin_port = htons(state->options_->port);
+  addr.addrInet.sin_port = htons(options->port);
 
   LOG(INFO) << "Connecting out to " << inet_ntoa(addr.addrInet.sin_addr) << ":" << ntohs(addr.addrInet.sin_port);
 
@@ -396,7 +396,7 @@
     return false;
   }
 
-  LOG(INFO) << "Connection established to " << state->options_->host << " (" << inet_ntoa(addr.addrInet.sin_addr) << ":" << ntohs(addr.addrInet.sin_port) << ")";
+  LOG(INFO) << "Connection established to " << options->host << " (" << inet_ntoa(addr.addrInet.sin_addr) << ":" << ntohs(addr.addrInet.sin_port) << ")";
   netState->awaitingHandshake = true;
   netState->inputCount = 0;
 
@@ -686,7 +686,7 @@
    */
   return handlePacket(state);
 
-fail:
+ fail:
   closeConnection(state);
   return false;
 }
diff --git a/src/jni_compiler_test.cc b/src/jni_compiler_test.cc
index c5710f8..f5e1d1e 100644
--- a/src/jni_compiler_test.cc
+++ b/src/jni_compiler_test.cc
@@ -38,7 +38,6 @@
 
 class JniCompilerTest : public CommonTest {
  protected:
-
   void CompileForTest(ClassLoader* class_loader, bool direct,
                       const char* method_name, const char* method_sig) {
     // Compile the native method before starting the runtime
@@ -92,6 +91,7 @@
  public:
   static jclass jklass_;
   static jobject jobj_;
+
  protected:
   JNIEnv* env_;
   jmethodID jmethod_;
diff --git a/src/jni_internal.cc b/src/jni_internal.cc
index f3ef3ef..716bb85 100644
--- a/src/jni_internal.cc
+++ b/src/jni_internal.cc
@@ -769,7 +769,6 @@
 
 class JNI {
  public:
-
   static jint GetVersion(JNIEnv* env) {
     ScopedJniThreadState ts(env);
     return JNI_VERSION_1_6;
diff --git a/src/mem_map.h b/src/mem_map.h
index 3861327..3f39210 100644
--- a/src/mem_map.h
+++ b/src/mem_map.h
@@ -28,7 +28,6 @@
 // Used to keep track of mmap segments.
 class MemMap {
  public:
-
   // Request an anonymous region of length 'byte_count' and a requested base address.
   // Use NULL as the requested base address if you don't care.
   //
diff --git a/src/monitor.cc b/src/monitor.cc
index e11517f..30e0172 100644
--- a/src/monitor.cc
+++ b/src/monitor.cc
@@ -490,7 +490,7 @@
   // Reacquire the monitor lock.
   Lock(self);
 
-done:
+ done:
   /*
    * We remove our thread from wait set after restoring the count
    * and owner fields so the subroutine can check that the calling
@@ -597,7 +597,7 @@
   DCHECK(self != NULL);
   DCHECK(obj != NULL);
   uint32_t threadId = self->GetThinLockId();
-retry:
+ retry:
   thin = *thinp;
   if (LW_SHAPE(thin) == LW_SHAPE_THIN) {
     /*
diff --git a/src/oat/runtime/arm/oat_support_entrypoints_arm.cc b/src/oat/runtime/arm/oat_support_entrypoints_arm.cc
index d26a11d..37454fd 100644
--- a/src/oat/runtime/arm/oat_support_entrypoints_arm.cc
+++ b/src/oat/runtime/arm/oat_support_entrypoints_arm.cc
@@ -98,11 +98,11 @@
 extern "C" double fmod(double a, double b);         // REM_DOUBLE[_2ADDR]
 
 // Integer arithmetics.
-extern "C" int __aeabi_idivmod(int32_t op1, int32_t op2);  // [DIV|REM]_INT[_2ADDR|_LIT8|_LIT16]
+extern "C" int __aeabi_idivmod(int32_t, int32_t);  // [DIV|REM]_INT[_2ADDR|_LIT8|_LIT16]
 
 // Long long arithmetics - REM_LONG[_2ADDR] and DIV_LONG[_2ADDR]
-extern "C" long long __aeabi_ldivmod(long long op1, long long op2);
-extern "C" long long __aeabi_lmul(long long op1, long long op2);
+extern "C" int64_t __aeabi_ldivmod(int64_t, int64_t);
+extern "C" int64_t __aeabi_lmul(int64_t, int64_t);
 extern "C" uint64_t art_shl_long(uint64_t, uint32_t);
 extern "C" uint64_t art_shr_long(uint64_t, uint32_t);
 extern "C" uint64_t art_ushr_long(uint64_t, uint32_t);
diff --git a/src/oat/runtime/mips/oat_support_entrypoints_mips.cc b/src/oat/runtime/mips/oat_support_entrypoints_mips.cc
index 9b4a46f..c131be4 100644
--- a/src/oat/runtime/mips/oat_support_entrypoints_mips.cc
+++ b/src/oat/runtime/mips/oat_support_entrypoints_mips.cc
@@ -100,8 +100,8 @@
 extern "C" double fmod(double a, double b);     // REM_DOUBLE[_2ADDR]
 
 // Long long arithmetics - REM_LONG[_2ADDR] and DIV_LONG[_2ADDR]
-extern "C" long long __divdi3(int64_t op1, int64_t op2);
-extern "C" long long __moddi3(int64_t op1, int64_t op2);
+extern "C" int64_t __divdi3(int64_t, int64_t);
+extern "C" int64_t __moddi3(int64_t, int64_t);
 extern "C" uint64_t art_shl_long(uint64_t, uint32_t);
 extern "C" uint64_t art_shr_long(uint64_t, uint32_t);
 extern "C" uint64_t art_ushr_long(uint64_t, uint32_t);
diff --git a/src/oat/runtime/support_invoke.cc b/src/oat/runtime/support_invoke.cc
index 14040ce..95dab98 100644
--- a/src/oat/runtime/support_invoke.cc
+++ b/src/oat/runtime/support_invoke.cc
@@ -20,7 +20,7 @@
 namespace art {
 
 static uint64_t artInvokeCommon(uint32_t method_idx, Object* this_object, Method* caller_method,
-                                Thread* self, Method** sp, bool access_check, InvokeType type){
+                                Thread* self, Method** sp, bool access_check, InvokeType type) {
   Method* method = FindMethodFast(method_idx, this_object, caller_method, access_check, type);
   if (UNLIKELY(method == NULL)) {
     FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsAndArgs);
diff --git a/src/oat_file.h b/src/oat_file.h
index 1ad6e5d..a4ca2de 100644
--- a/src/oat_file.h
+++ b/src/oat_file.h
@@ -248,6 +248,7 @@
     }
 
     ~OatDexFile();
+
    private:
     OatDexFile(const OatFile* oat_file,
                const std::string& dex_file_location,
diff --git a/src/oat_writer.h b/src/oat_writer.h
index 956475c..fe0bd67 100644
--- a/src/oat_writer.h
+++ b/src/oat_writer.h
@@ -81,7 +81,6 @@
                      const Compiler& compiler);
 
  private:
-
   OatWriter(const std::vector<const DexFile*>& dex_files,
             uint32_t image_file_location_checksum,
             const std::string& image_file_location,
diff --git a/src/oatdump.cc b/src/oatdump.cc
index 8dd4e45..ac5e41d 100644
--- a/src/oatdump.cc
+++ b/src/oatdump.cc
@@ -607,7 +607,6 @@
   }
 
  private:
-
   static void PrettyObjectValue(std::string& summary, Class* type, Object* value) {
     CHECK(type != NULL);
     if (value == NULL) {
diff --git a/src/object.h b/src/object.h
index cbb3aa9..c1e4667 100644
--- a/src/object.h
+++ b/src/object.h
@@ -1044,6 +1044,11 @@
     return reinterpret_cast<void*>(data);
   }
 
+  const void* GetRawData(size_t component_size) const {
+    intptr_t data = reinterpret_cast<intptr_t>(this) + DataOffset(component_size).Int32Value();
+    return reinterpret_cast<const void*>(data);
+  }
+
  protected:
   bool IsValidIndex(int32_t index) const {
     if (UNLIKELY(index < 0 || index >= length_)) {
@@ -1126,7 +1131,6 @@
 // C++ mirror of java.lang.Class
 class MANAGED Class : public StaticStorageBase {
  public:
-
   // Class Status
   //
   // kStatusNotReady: If a Class cannot be found in the class table by
@@ -1158,7 +1162,6 @@
   // again at runtime.
   //
   // TODO: Explain the other states
-
   enum Status {
     kStatusError = -1,
     kStatusNotReady = 0,
@@ -2220,7 +2223,6 @@
 // C++ mirror of java.lang.String
 class MANAGED String : public Object {
  public:
-
   static MemberOffset CountOffset() {
     return OFFSET_OF_OBJECT_MEMBER(String, count_);
   }
diff --git a/src/object_utils.h b/src/object_utils.h
index c186a24..ca666bf 100644
--- a/src/object_utils.h
+++ b/src/object_utils.h
@@ -633,6 +633,7 @@
     }
     return result;
   }
+
  private:
   // Set the method_ field, for proxy methods looking up the interface method via the resolved
   // methods table.
diff --git a/src/os.h b/src/os.h
index 653f14d..33552ad 100644
--- a/src/os.h
+++ b/src/os.h
@@ -25,7 +25,6 @@
 
 class OS {
  public:
-
   // Open a file. The returned file must be deleted by the caller.
   static File* OpenFile(const char* name, bool writable, bool create = true);
 
diff --git a/src/runtime.h b/src/runtime.h
index 698f0c5..e3e0caf 100644
--- a/src/runtime.h
+++ b/src/runtime.h
@@ -53,7 +53,6 @@
 
 class Runtime {
  public:
-
   typedef std::vector<std::pair<std::string, const void*> > Options;
 
   class ParsedOptions {
diff --git a/src/stack.h b/src/stack.h
index 9093cb1..a26b632 100644
--- a/src/stack.h
+++ b/src/stack.h
@@ -41,7 +41,7 @@
  public:
   Frame() : sp_(NULL) {}
 
-  Frame(Method** sp) : sp_(sp) {}
+  explicit Frame(Method** sp) : sp_(sp) {}
 
   Method* GetMethod() const {
     return (sp_ != NULL) ? *sp_ : NULL;
diff --git a/src/verifier/gc_map.cc b/src/verifier/gc_map.cc
index b9a3ef4..a9d481e 100644
--- a/src/verifier/gc_map.cc
+++ b/src/verifier/gc_map.cc
@@ -52,5 +52,5 @@
   return NULL;
 }
 
-}  // verifier
-}  // art
+}  // namespace verifier
+}  // namespace art
diff --git a/src/verifier/method_verifier.cc b/src/verifier/method_verifier.cc
index 7140cca..f6a2ddb 100644
--- a/src/verifier/method_verifier.cc
+++ b/src/verifier/method_verifier.cc
@@ -132,6 +132,7 @@
     }
     return std::string(encoding);
   }
+
  private:
   enum {
     kInTry,
diff --git a/src/verifier/method_verifier.h b/src/verifier/method_verifier.h
index afbfa16..5f72678 100644
--- a/src/verifier/method_verifier.h
+++ b/src/verifier/method_verifier.h
@@ -160,6 +160,7 @@
 #elif defined(ART_USE_GREENLAND_COMPILER)
   typedef greenland::InferredRegCategoryMap InferredRegCategoryMap;
 #endif
+
  public:
   enum FailureKind {
     kNoFailure,
@@ -210,7 +211,6 @@
   static bool IsClassRejected(Compiler::ClassReference ref);
 
  private:
-
   explicit MethodVerifier(const DexFile* dex_file, DexCache* dex_cache,
       const ClassLoader* class_loader, uint32_t class_def_idx, const DexFile::CodeItem* code_item,
       uint32_t method_idx, Method* method, uint32_t access_flags);
diff --git a/src/verifier/reg_type.cc b/src/verifier/reg_type.cc
index 6598458..217084f 100644
--- a/src/verifier/reg_type.cc
+++ b/src/verifier/reg_type.cc
@@ -329,5 +329,5 @@
   return os;
 }
 
-}  // verifier
-}  // art
+}  // namespace verifier
+}  // namespace art
diff --git a/src/verifier/reg_type_cache.cc b/src/verifier/reg_type_cache.cc
index 53b7a76..c860bd7 100644
--- a/src/verifier/reg_type_cache.cc
+++ b/src/verifier/reg_type_cache.cc
@@ -269,5 +269,5 @@
   }
 }
 
-}  // verifier
-}  // art
+}  // namespace verifier
+}  // namespace art
diff --git a/src/verifier/reg_type_cache.h b/src/verifier/reg_type_cache.h
index ca0ada6..91a2933 100644
--- a/src/verifier/reg_type_cache.h
+++ b/src/verifier/reg_type_cache.h
@@ -78,6 +78,7 @@
   const RegType& IntConstant() { return FromCat1Const(std::numeric_limits<jint>::max()); }
 
   const RegType& GetComponentType(const RegType& array, const ClassLoader* loader);
+
  private:
   // The allocated entries
   std::vector<RegType*> entries_;
diff --git a/src/verifier/register_line.h b/src/verifier/register_line.h
index f214b81..f9a2345 100644
--- a/src/verifier/register_line.h
+++ b/src/verifier/register_line.h
@@ -229,8 +229,8 @@
 
   // Write a bit at each register location that holds a reference
   void WriteReferenceBitMap(std::vector<uint8_t>& data, size_t max_bytes);
- private:
 
+ private:
   void CopyRegToLockDepth(size_t dst, size_t src) {
     SafeMap<uint32_t, uint32_t>::iterator it = reg_to_lock_depths_.find(src);
     if (it != reg_to_lock_depths_.end()) {
diff --git a/src/zip_archive.h b/src/zip_archive.h
index cda3522..d7a8d80 100644
--- a/src/zip_archive.h
+++ b/src/zip_archive.h
@@ -42,7 +42,6 @@
   uint32_t GetCrc32();
 
  private:
-
   ZipEntry(const ZipArchive* zip_archive, const byte* ptr) : zip_archive_(zip_archive), ptr_(ptr) {}
 
   // Zip compression methods
@@ -65,11 +64,11 @@
   const byte* ptr_;
 
   friend class ZipArchive;
+  DISALLOW_COPY_AND_ASSIGN(ZipEntry);
 };
 
 class ZipArchive {
  public:
-
   // Zip file constants.
   static const uint32_t kEOCDSignature  = 0x06054b50;
   static const int32_t kEOCDLen         = 22;
@@ -122,6 +121,8 @@
   DirEntries dir_entries_;
 
   friend class ZipEntry;
+
+  DISALLOW_COPY_AND_ASSIGN(ZipArchive);
 };
 
 }  // namespace art