From 147130a91624079dbc6237d2426f122e0f6513e6 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Thu, 3 Sep 2020 18:43:57 +0200 Subject: Fix deprecations and build warnings. Fixes AyatanaIndicators/ayatana-indicator-power#9. --- tests/CMakeLists.txt | 1 - tests/test-notify.cc | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4010b54..93b62e9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -8,7 +8,6 @@ include_directories (SYSTEM ${DBUSTEST_INCLUDE_DIRS}) # add warnings set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${C_WARNING_ARGS}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-weak-vtables -Wno-global-constructors") # Google Test # build the necessary schemas set_directory_properties (PROPERTIES diff --git a/tests/test-notify.cc b/tests/test-notify.cc index 9a11984..63214c2 100644 --- a/tests/test-notify.cc +++ b/tests/test-notify.cc @@ -150,8 +150,8 @@ protected: while ((bus != nullptr) && (cleartry < 50)) { g_usleep(100000); - while (g_main_pending()) - g_main_iteration(true); + while (g_main_context_pending(NULL)) + g_main_context_iteration(NULL, true); cleartry++; } -- cgit v1.2.3