diff --git a/apps/model-diagnostics/model_diagnostics.cpp b/apps/model-diagnostics/model_diagnostics.cpp index ed20ec07b1..2ffeaa1ea5 100644 --- a/apps/model-diagnostics/model_diagnostics.cpp +++ b/apps/model-diagnostics/model_diagnostics.cpp @@ -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);