Browse Source

clean static code check warnings

feature/build-system-rewrite
zhangzhaoju 4 years ago
parent
commit
8086ea18b8
6 changed files with 4 additions and 16 deletions
  1. +0
    -2
      mindspore/core/ir/value_extends.cc
  2. +3
    -6
      mindspore/core/utils/crypto.cc
  3. +0
    -5
      mindspore/core/utils/label.cc
  4. +0
    -1
      mindspore/core/utils/label.h
  5. +1
    -1
      mindspore/core/utils/ms_context.h
  6. +0
    -1
      mindspore/core/utils/trace_info.cc

+ 0
- 2
mindspore/core/ir/value_extends.cc View File

@@ -17,8 +17,6 @@
#include "ir/value.h"
#include <algorithm>
#include <memory>
#include <cmath>
#include <cfloat>

#include "abstract/abstract_value.h"



+ 3
- 6
mindspore/core/utils/crypto.cc View File

@@ -66,22 +66,19 @@ bool IsCipherFile(const Byte *model_data) {
return static_cast<unsigned int>(flag) == MAGIC_NUM;
}
#ifndef ENABLE_OPENSSL
std::unique_ptr<Byte[]> Encrypt(size_t *encrypt_len, const Byte *plain_data, size_t plain_len, const Byte *key,
size_t key_len, const std::string &enc_mode) {
std::unique_ptr<Byte[]> Encrypt(size_t *, const Byte *, size_t, const Byte *, size_t, const std::string &) {
MS_LOG(ERROR) << "The feature is only supported on the Linux platform "
"when the OPENSSL compilation option is enabled.";
return nullptr;
}

std::unique_ptr<Byte[]> Decrypt(size_t *decrypt_len, const std::string &encrypt_data_path, const Byte *key,
size_t key_len, const std::string &dec_mode) {
std::unique_ptr<Byte[]> Decrypt(size_t *, const std::string &, const Byte *, size_t, const std::string &) {
MS_LOG(ERROR) << "The feature is only supported on the Linux platform "
"when the OPENSSL compilation option is enabled.";
return nullptr;
}

std::unique_ptr<Byte[]> Decrypt(size_t *decrypt_len, const Byte *model_data, size_t data_size, const Byte *key,
size_t key_len, const std::string &dec_mode) {
std::unique_ptr<Byte[]> Decrypt(size_t *, const Byte *, size_t, const Byte *, size_t, const std::string &) {
MS_LOG(ERROR) << "The feature is only supported on the Linux platform "
"when the OPENSSL compilation option is enabled.";
return nullptr;


+ 0
- 5
mindspore/core/utils/label.cc View File

@@ -15,12 +15,8 @@
*/

#include "utils/label.h"
#include <algorithm>
#include <sstream>
#include <utility>

#include "utils/info.h"
#include "ir/func_graph.h"

namespace mindspore {
namespace label_manage {
@@ -28,7 +24,6 @@ static TraceLabelType global_trace_type = (common::GetEnv("MS_DEV_TRACE_LABEL_WI
? TraceLabelType::kWithUniqueId
: TraceLabelType::kShortSymbol;
TraceLabelType GetGlobalTraceLabelType() { return global_trace_type; }
void SetGlobalTraceLabelType(TraceLabelType label_type) { global_trace_type = label_type; }

struct NameWithTrace {
std::string name;


+ 0
- 1
mindspore/core/utils/label.h View File

@@ -27,7 +27,6 @@ namespace mindspore {
namespace label_manage {
enum class TraceLabelType { kShortSymbol, kFullName, kWithUniqueId };
TraceLabelType GetGlobalTraceLabelType();
void SetGlobalTraceLabelType(TraceLabelType label_type);
std::string Label(const DebugInfoPtr &debug_info, TraceLabelType trace_type = TraceLabelType::kShortSymbol);
} // namespace label_manage
} // namespace mindspore


+ 1
- 1
mindspore/core/utils/ms_context.h View File

@@ -163,7 +163,7 @@ class MsContext {
static void device_type_seter(const DeviceTypeSeter &device_type) { device_type_seter_ = device_type; }

template <typename T>
void set_param(MsCtxParam, const T &value) {
void set_param(MsCtxParam, const T &) {
MS_LOG(EXCEPTION) << "Need to implement " << __FUNCTION__ << " for type " << typeid(T).name() << ".";
}



+ 0
- 1
mindspore/core/utils/trace_info.cc View File

@@ -15,7 +15,6 @@
*/

#include "utils/trace_info.h"
#include <sstream>
#include "ir/anf.h"

namespace mindspore {


Loading…
Cancel
Save