diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/resize_infer.c b/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/resize_infer.c index 48e68e64267..9193f99343b 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/resize_infer.c +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/resize_infer.c @@ -44,8 +44,8 @@ int HandleTwoInputs(const TensorC *const *inputs, ResizeParameter *param) { return NNACL_INFER_INVALID; } - MS_CHECK_INT_MUL_NOT_OVERFLOW(data[1], GetHeight(input), NNACL_ERRCODE_MUL_OVERFLOW); - MS_CHECK_INT_MUL_NOT_OVERFLOW(data[2], GetWidth(input), NNACL_ERRCODE_MUL_OVERFLOW); + MS_CHECK_INT_MUL_NOT_OVERFLOW((int)(data[1]), GetHeight(input), NNACL_ERRCODE_MUL_OVERFLOW); + MS_CHECK_INT_MUL_NOT_OVERFLOW((int)(data[2]), GetWidth(input), NNACL_ERRCODE_MUL_OVERFLOW); param->new_height_ = round(data[1] * GetHeight(input)); param->new_width_ = round(data[2] * GetWidth(input)); } diff --git a/mindspore/lite/tools/converter/CMakeLists.txt b/mindspore/lite/tools/converter/CMakeLists.txt index ad62ffb3676..211bce4d557 100644 --- a/mindspore/lite/tools/converter/CMakeLists.txt +++ b/mindspore/lite/tools/converter/CMakeLists.txt @@ -189,7 +189,10 @@ file(GLOB PROTO_FILE "" ${TOP_DIR}/third_party/proto/onnx/onnx.proto) ms_protobuf_generate(PROTO_SRCS PROTO_HDRS ${PROTO_FILE}) + add_library(proto_mid OBJECT ${PROTO_SRCS}) +target_compile_options(proto_mid PRIVATE "-Wno-array-bounds") + set(TFLITE_FBS_FILES ${TOP_DIR}/third_party/proto/tensorflow/lite/schema.fbs )