Fixed 3 issues found by static analysis

pull/10320/head
Maksim Shabunin 7 years ago
parent 62359f70ff
commit 1033f2b1bd
  1. 2
      modules/dnn/src/dnn.cpp
  2. 1
      modules/dnn/src/layers/convolution_layer.cpp
  3. 2
      modules/imgproc/src/smooth.cpp

@ -655,6 +655,8 @@ struct Net::Impl
fusion = true;
preferableBackend = DNN_BACKEND_DEFAULT;
preferableTarget = DNN_TARGET_CPU;
blobManager.setPreferableBackend(DNN_BACKEND_DEFAULT);
blobManager.setPreferableTarget(DNN_TARGET_CPU);
}
Ptr<DataLayer> netInputLayer;

@ -783,6 +783,7 @@ public:
if( IS_POWER_LAYER(activ) )
{
Ptr<PowerLayer> activ_power = activ.dynamicCast<PowerLayer>();
CV_Assert(activ_power);
a = activ_power->scale;
b = activ_power->shift;
}

@ -1844,7 +1844,7 @@ static bool ocl_GaussianBlur_8UC1(InputArray _src, OutputArray _dst, Size ksize,
const char * const borderMap[] = { "BORDER_CONSTANT", "BORDER_REPLICATE", "BORDER_REFLECT", 0, "BORDER_REFLECT_101" };
char build_opts[1024];
sprintf(build_opts, "-D %s %s%s", borderMap[borderType],
sprintf(build_opts, "-D %s %s%s", borderMap[borderType & ~BORDER_ISOLATED],
ocl::kernelToStr(kernelX, CV_32F, "KERNEL_MATRIX_X").c_str(),
ocl::kernelToStr(kernelY, CV_32F, "KERNEL_MATRIX_Y").c_str());

Loading…
Cancel
Save