Fix some prefast checking found problems. (#14342)

Fix : BUG 8989, BUG 9014
This commit is contained in:
Zhang Lei 2023-01-20 11:04:52 -08:00 committed by GitHub
parent 3b382ea7e1
commit e64f357ad4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -151,7 +151,7 @@ Status QOrderedMatMul::ComputeInternal(OpKernelContext* context) const {
TensorShape shapeY(tensor_A.Shape());
shapeY[shapeY.NumDimensions() - 1] = colsB;
const float zero = 0.0f;
constexpr float zero = 0.0f;
const int8_t* C = nullptr;
const float* scaleC = &zero;
const Tensor* tensor_C = context->Input<Tensor>(6);

View file

@ -815,7 +815,7 @@ Status QLinearConv<ActType>::Compute(OpKernelContext* context) const {
}
auto conv_worker = [&](ptrdiff_t batch) {
int64_t output_start = batch * stride_m;
int64_t output_start = (int64_t)batch * (int64_t)stride_m;
int64_t output_count = std::min((int64_t)stride_m, output_image_size - output_start);
ActType const** worker_indirection_buffer = nullptr;