Commit 1033f2b1 authored by Maksim Shabunin's avatar Maksim Shabunin

Fixed 3 issues found by static analysis

parent 62359f70
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment