Don't default-construct std::strings and then assign them.

Change-Id: I8c994d1e6a8d2ebe52eaa4f0132e0deb2ecfa5f3
diff --git a/src/thread.cc b/src/thread.cc
index fdfbf31..741727c 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -1304,7 +1304,7 @@
 void Thread::DumpFromGdb() const {
   std::ostringstream ss;
   Dump(ss);
-  std::string str = ss.str();
+  std::string str(ss.str());
   // log to stderr for debugging command line processes
   std::cerr << str;
 #ifdef HAVE_ANDROID_OS