OSDN Git Service

Initialize a variable to suppress compiler error
authorGoran Jakovljevic <Goran.Jakovljevic@imgtec.com>
Tue, 19 Apr 2016 08:27:21 +0000 (10:27 +0200)
committerGoran Jakovljevic <Goran.Jakovljevic@imgtec.com>
Tue, 19 Apr 2016 09:36:49 +0000 (11:36 +0200)
GCC (mips32 Buildbot) is complaining about the possibility of
uninitialized usage.

Change-Id: I217aa371189e06bed498288bf40e85406806c5ff

runtime/monitor.cc

index 2c30828..ed6a8e4 100644 (file)
@@ -221,7 +221,7 @@ std::string Monitor::PrettyContentionInfo(Thread* owner,
                                           size_t num_waiters) {
   DCHECK(owner != nullptr);
   const char* owners_filename;
-  int32_t owners_line_number;
+  int32_t owners_line_number = 0;
   std::string name;
   owner->GetThreadName(name);
   if (owners_method != nullptr) {