diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/album_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/album_op.cc index d48759b66c..7fac0a181a 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/album_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/album_op.cc @@ -36,8 +36,8 @@ AlbumOp::Builder::Builder() : builder_decode_(false), builder_sampler_(nullptr), Status AlbumOp::Builder::Build(std::shared_ptr *ptr) { RETURN_IF_NOT_OK(SanityCheck()); if (builder_sampler_ == nullptr) { - int64_t num_samples = 0; // default num samples of 0 means to sample entire set of data - int64_t start_index = 0; + const int64_t num_samples = 0; // default num samples of 0 means to sample entire set of data + const int64_t start_index = 0; builder_sampler_ = std::make_shared(start_index, num_samples); } diff --git a/mindspore/ccsrc/minddata/dataset/engine/gnn/grpc_async_server.cc b/mindspore/ccsrc/minddata/dataset/engine/gnn/grpc_async_server.cc index 89000e973e..02c967e442 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/gnn/grpc_async_server.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/gnn/grpc_async_server.cc @@ -51,7 +51,7 @@ Status GrpcAsyncServer::Run() { } Status GrpcAsyncServer::HandleRequest() { - bool success; + bool success = false; void *tag; // We loop through the grpc queue. Each connection if successful // will come back with our own tag which is an instance of CallData