From 01302b9fa9b9264a70070d3bd00572fb3ca7dbfd Mon Sep 17 00:00:00 2001 From: ZPaC Date: Fri, 15 Oct 2021 17:46:54 +0800 Subject: [PATCH] Fix static --- mindspore/ccsrc/fl/server/kernel/round/get_secrets_kernel.cc | 2 +- mindspore/ccsrc/fl/server/server.h | 2 +- mindspore/ccsrc/ps/util.cc | 4 ++-- mindspore/ccsrc/ps/worker.cc | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mindspore/ccsrc/fl/server/kernel/round/get_secrets_kernel.cc b/mindspore/ccsrc/fl/server/kernel/round/get_secrets_kernel.cc index cf018cac457..28143c31bd4 100644 --- a/mindspore/ccsrc/fl/server/kernel/round/get_secrets_kernel.cc +++ b/mindspore/ccsrc/fl/server/kernel/round/get_secrets_kernel.cc @@ -99,7 +99,7 @@ bool GetSecretsKernel::Launch(const std::vector &inputs, const std:: GenerateOutput(outputs, fbb->GetBufferPointer(), fbb->GetSize()); return true; } - if (!CountForGetSecrets(fbb, get_secrets_req, iter_num)) { + if (!CountForGetSecrets(fbb, get_secrets_req, SizeToInt(iter_num))) { GenerateOutput(outputs, fbb->GetBufferPointer(), fbb->GetSize()); return true; } diff --git a/mindspore/ccsrc/fl/server/server.h b/mindspore/ccsrc/fl/server/server.h index a4bbb7d604b..4d5109e6348 100644 --- a/mindspore/ccsrc/fl/server/server.h +++ b/mindspore/ccsrc/fl/server/server.h @@ -191,7 +191,7 @@ class Server { // Variables set by ps context. #ifdef ENABLE_ARMOUR - armour::CipherInit *cipher_init_; + armour::CipherInit *cipher_init_{nullptr}; #endif std::string scheduler_ip_; uint16_t scheduler_port_; diff --git a/mindspore/ccsrc/ps/util.cc b/mindspore/ccsrc/ps/util.cc index 99b5ffba2d9..4d19b4657b5 100644 --- a/mindspore/ccsrc/ps/util.cc +++ b/mindspore/ccsrc/ps/util.cc @@ -214,12 +214,12 @@ kernel::KernelBuildInfoPtr Util::GenerateKernelBuildInfo(const std::vector(iter->second); - size_t grad_size = send.len()[grad_index]; - size_t indice_size = send.len()[indice_index]; + size_t grad_size = send.len()[SizeToInt(grad_index)]; + size_t indice_size = send.len()[SizeToInt(indice_index)]; size_t segment_size = grad_size / indice_size; size_t grad_offset = 0;