Commit b3a05075 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #15475 from alalek:build_eliminate_warning_array_bounds

parents f139a0bd bdf23ce8
......@@ -2703,7 +2703,7 @@ static void calcSobelKernel1D( int order, int _aperture_size, int size, vector<i
if( _aperture_size < 0 )
{
static const int scharr[] = { 3, 10, 3, -1, 0, 1 };
static const int scharr[8] = { 3, 10, 3, -1, 0, 1, 0, 0 }; // extra elements to eliminate "-Warray-bounds" bogus warning
assert( size == 3 );
for( i = 0; i < size; i++ )
kernel[i] = scharr[order*3 + i];
......
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