1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Alekhin
2022-08-21 14:55:48 +00:00
538 changed files with 84703 additions and 5374 deletions
+2 -2
View File
@@ -312,7 +312,7 @@ void BaseTest::safe_run( int start_from )
char buf[1 << 16];
const char* delim = exc.err.find('\n') == cv::String::npos ? "" : "\n";
sprintf( buf, "OpenCV Error:\n\t%s (%s%s) in %s, file %s, line %d",
snprintf( buf, sizeof(buf), "OpenCV Error:\n\t%s (%s%s) in %s, file %s, line %d",
errorStr, delim, exc.err.c_str(), exc.func.size() > 0 ?
exc.func.c_str() : "unknown function", exc.file.c_str(), exc.line );
ts->printf(TS::LOG, "%s\n", buf);
@@ -603,7 +603,7 @@ void TS::set_gtest_status()
return SUCCEED();
char seedstr[32];
sprintf(seedstr, "%08x%08x", (unsigned)(current_test_info.rng_seed>>32),
snprintf(seedstr, sizeof(seedstr), "%08x%08x", (unsigned)(current_test_info.rng_seed>>32),
(unsigned)(current_test_info.rng_seed));
string logs = "";
+4 -4
View File
@@ -29,7 +29,7 @@ string vec2str( const string& sep, const int* v, size_t nelems )
string result = "";
for( size_t i = 0; i < nelems; i++ )
{
sprintf(buf, "%d", v[i]);
snprintf(buf, sizeof(buf), "%d", v[i]);
result += string(buf);
if( i < nelems - 1 )
result += sep;
@@ -2154,15 +2154,15 @@ int cmpEps2( TS* ts, const Mat& a, const Mat& b, double success_err_level,
switch( code )
{
case CMP_EPS_BIG_DIFF:
sprintf( msg, "%s: Too big difference (=%g > %g)", desc, diff, success_err_level );
snprintf( msg, sizeof(msg), "%s: Too big difference (=%g > %g)", desc, diff, success_err_level );
code = TS::FAIL_BAD_ACCURACY;
break;
case CMP_EPS_INVALID_TEST_DATA:
sprintf( msg, "%s: Invalid output", desc );
snprintf( msg, sizeof(msg), "%s: Invalid output", desc );
code = TS::FAIL_INVALID_OUTPUT;
break;
case CMP_EPS_INVALID_REF_DATA:
sprintf( msg, "%s: Invalid reference output", desc );
snprintf( msg, sizeof(msg), "%s: Invalid reference output", desc );
code = TS::FAIL_INVALID_OUTPUT;
break;
default:
+1 -1
View File
@@ -8718,7 +8718,7 @@ static void StackLowerThanAddress(const void* ptr, bool* result) {
// Make sure AddressSanitizer does not tamper with the stack here.
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
static bool StackGrowsDown() {
int dummy;
int dummy = 0;
bool result;
StackLowerThanAddress(&dummy, &result);
return result;