Merge pull request #930 from pherl/bazel_test

add warning notes for cc|py_proto_library rules.
diff --git a/src/google/protobuf/util/field_comparator_test.cc b/src/google/protobuf/util/field_comparator_test.cc
index 748c7d1..d3d3460 100644
--- a/src/google/protobuf/util/field_comparator_test.cc
+++ b/src/google/protobuf/util/field_comparator_test.cc
@@ -34,9 +34,10 @@
 
 #include <google/protobuf/unittest.pb.h>
 #include <google/protobuf/descriptor.h>
-#include <gtest/gtest.h>
 #include <google/protobuf/stubs/mathutil.h>
 
+#include <gtest/gtest.h>
+
 namespace google {
 namespace protobuf {
 namespace util {
diff --git a/src/google/protobuf/util/internal/protostream_objectwriter.cc b/src/google/protobuf/util/internal/protostream_objectwriter.cc
index 08a2fb9..0958997 100644
--- a/src/google/protobuf/util/internal/protostream_objectwriter.cc
+++ b/src/google/protobuf/util/internal/protostream_objectwriter.cc
@@ -602,7 +602,7 @@
 
 bool ProtoStreamObjectWriter::ProtoElement::InsertMapKeyIfNotPresent(
     StringPiece map_key) {
-  return InsertIfNotPresent(&map_keys_, map_key);
+  return InsertIfNotPresent(&map_keys_, map_key.ToString());
 }
 
 inline void ProtoStreamObjectWriter::InvalidName(StringPiece unknown_name,
diff --git a/src/google/protobuf/util/internal/protostream_objectwriter.h b/src/google/protobuf/util/internal/protostream_objectwriter.h
index 19f747f..6e13367 100644
--- a/src/google/protobuf/util/internal/protostream_objectwriter.h
+++ b/src/google/protobuf/util/internal/protostream_objectwriter.h
@@ -305,7 +305,7 @@
 
     // Set of map keys already seen for the type_. Used to validate incoming
     // messages so no map key appears more than once.
-    hash_set<StringPiece> map_keys_;
+    hash_set<string> map_keys_;
 
     GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS(ProtoElement);
   };