apps(model_diagnostics): fix invalid callback

This commit is contained in:
Alexander Alekhin 2021-04-01 10:26:22 +00:00
parent e08de1101d
commit 28f919d9d2

View File

@ -12,11 +12,14 @@ using namespace cv;
using namespace dnn;
static void diagnosticsErrorCallback(const Exception& exc)
static
int diagnosticsErrorCallback(int /*status*/, const char* /*func_name*/,
const char* /*err_msg*/, const char* /*file_name*/,
int /*line*/, void* /*userdata*/)
{
CV_UNUSED(exc);
fflush(stdout);
fflush(stderr);
return 0;
}
static std::string checkFileExists(const std::string& fileName)
@ -54,7 +57,7 @@ int main( int argc, const char** argv )
CV_Assert(!model.empty());
enableModelDiagnostics(true);
redirectError((ErrorCallback)diagnosticsErrorCallback, NULL);
redirectError(diagnosticsErrorCallback, NULL);
Net ocvNet = readNet(model, config, frameworkId);