From 3f7ec99166cd927f00cea34b79b88b19ad34a1bc Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 20 Dec 2022 06:36:01 +0000 Subject: [PATCH] build: eliminate build warnings on Ubuntu 20.04/16.04 --- modules/gapi/CMakeLists.txt | 2 +- modules/gapi/src/executor/gtbbexecutor.hpp | 3 +++ modules/gapi/test/executor/gtbbexecutor_internal_tests.cpp | 6 +++--- .../test/streaming/gapi_gstreamer_pipeline_facade_int_tests.cpp | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/gapi/CMakeLists.txt b/modules/gapi/CMakeLists.txt index 3deb518..2553b3c 100644 --- a/modules/gapi/CMakeLists.txt +++ b/modules/gapi/CMakeLists.txt @@ -382,7 +382,7 @@ if(TARGET example_gapi_onevpl_infer_with_advanced_device_selection) ocv_target_include_directories(example_gapi_onevpl_infer_with_advanced_device_selection SYSTEM PRIVATE ${OPENCL_INCLUDE_DIRS}) endif() if(UNIX AND HAVE_VA) - message ("GAPI VPL samples with VAAPI") + message(STATUS "GAPI VPL samples with VAAPI") ocv_target_include_directories(example_gapi_onevpl_infer_with_advanced_device_selection SYSTEM PRIVATE ${VA_INCLUDE_DIR}) ocv_target_link_libraries(example_gapi_onevpl_infer_with_advanced_device_selection PRIVATE ${VA_LIBRARIES}) endif() diff --git a/modules/gapi/src/executor/gtbbexecutor.hpp b/modules/gapi/src/executor/gtbbexecutor.hpp index 3c2bf1f..342ba48 100644 --- a/modules/gapi/src/executor/gtbbexecutor.hpp +++ b/modules/gapi/src/executor/gtbbexecutor.hpp @@ -12,6 +12,9 @@ #endif #ifdef HAVE_TBB +#ifndef TBB_SUPPRESS_DEPRECATED_MESSAGES +#define TBB_SUPPRESS_DEPRECATED_MESSAGES 1 +#endif #include #include #if TBB_INTERFACE_VERSION < 12000 diff --git a/modules/gapi/test/executor/gtbbexecutor_internal_tests.cpp b/modules/gapi/test/executor/gtbbexecutor_internal_tests.cpp index e1b93af..766ec6b 100644 --- a/modules/gapi/test/executor/gtbbexecutor_internal_tests.cpp +++ b/modules/gapi/test/executor/gtbbexecutor_internal_tests.cpp @@ -50,7 +50,7 @@ TEST(TBBExecutor, Basic) { }); q.push(&n); execute(q); - EXPECT_EQ(true, executed); + EXPECT_TRUE(executed); } TEST(TBBExecutor, SerialExecution) { @@ -117,8 +117,8 @@ TEST(TBBExecutor, AsyncBasic) { async_thread.join(); - EXPECT_EQ(true, callback_called); - EXPECT_EQ(true, master_was_blocked_until_callback_called); + EXPECT_TRUE(callback_called); + EXPECT_TRUE(master_was_blocked_until_callback_called); } TEST(TBBExecutor, Dependencies) { diff --git a/modules/gapi/test/streaming/gapi_gstreamer_pipeline_facade_int_tests.cpp b/modules/gapi/test/streaming/gapi_gstreamer_pipeline_facade_int_tests.cpp index 7b809a8..6a3fb38 100644 --- a/modules/gapi/test/streaming/gapi_gstreamer_pipeline_facade_int_tests.cpp +++ b/modules/gapi/test/streaming/gapi_gstreamer_pipeline_facade_int_tests.cpp @@ -138,9 +138,9 @@ TEST(GStreamerPipelineFacadeTest, IsPlayingUnitTest) "video/x-raw,width=1920,height=1080,framerate=3/1 ! " "appsink name=sink2"); - EXPECT_EQ(false, pipelineFacade.isPlaying()); + EXPECT_FALSE(pipelineFacade.isPlaying()); pipelineFacade.play(); - EXPECT_EQ(true, pipelineFacade.isPlaying()); + EXPECT_TRUE(pipelineFacade.isPlaying()); } TEST(GStreamerPipelineFacadeTest, MTSafetyUnitTest) -- 2.7.4