From b5ef315cf15a90c4fc1cef22630171cdbe814dc2 Mon Sep 17 00:00:00 2001 From: Yancey Date: Mon, 12 Mar 2018 15:25:41 +0800 Subject: [PATCH] Fix dist compile error (#8987) --- paddle/fluid/operators/detail/bytebuffer_stream.cc | 2 +- paddle/fluid/operators/detail/sendrecvop_utils.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/operators/detail/bytebuffer_stream.cc b/paddle/fluid/operators/detail/bytebuffer_stream.cc index a9488156e07..741dd51de9e 100644 --- a/paddle/fluid/operators/detail/bytebuffer_stream.cc +++ b/paddle/fluid/operators/detail/bytebuffer_stream.cc @@ -85,4 +85,4 @@ google::protobuf::int64 GrpcByteBufferSource::ByteCount() const { } // namespace detail } // namespace operators -} // namespace paddle \ No newline at end of file +} // namespace paddle diff --git a/paddle/fluid/operators/detail/sendrecvop_utils.cc b/paddle/fluid/operators/detail/sendrecvop_utils.cc index f196fc9862d..39117eeeb61 100644 --- a/paddle/fluid/operators/detail/sendrecvop_utils.cc +++ b/paddle/fluid/operators/detail/sendrecvop_utils.cc @@ -82,7 +82,7 @@ void SerializeToByteBuffer(const std::string& name, framework::Variable* var, DestroyCallback destroy_callback = [](void* backing) {}; void* buf = malloc(1024); - void* payload; + void* payload = nullptr; size_t payload_size; ProtoEncodeHelper e((char*)buf, 1024); e.WriteString(VarMsg::kVarnameFieldNumber, name); @@ -297,4 +297,4 @@ void DeserializeFromByteBuffer(const ::grpc::ByteBuffer& msg, } // namespace detail } // namespace operators -} // namespace paddle \ No newline at end of file +} // namespace paddle -- GitLab