From a809dc42fd22fc0736838f877b8d026608b315ec Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 26 Apr 2021 16:09:06 +0200 Subject: CMakeLists.txt: Add Clang support. --- src/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 44244ce..96284fb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -57,9 +57,9 @@ endif() # add warnings/coverage info on handwritten files # but not the autogenerated ones... set_source_files_properties(${SERVICE_CXX_SOURCES} - PROPERTIES COMPILE_FLAGS "${CXX_WARNING_ARGS} ${GCOV_FLAGS} -g -std=c++11") + PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} ${GCOV_FLAGS} -g -std=c++11") set_source_files_properties(${SERVICE_C_SOURCES} - PROPERTIES COMPILE_FLAGS "${CXX_WARNING_ARGS} ${GCOV_FLAGS} -g -std=c99") + PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} ${GCOV_FLAGS} -g -std=c99") # add the bin dir to our include path so our code can find the generated header files include_directories (${CMAKE_CURRENT_BINARY_DIR}) @@ -69,6 +69,6 @@ include_directories (${CMAKE_SOURCE_DIR}) link_directories (${SERVICE_DEPS_LIBRARY_DIRS}) add_executable (${SERVICE_EXEC} main.cpp) -set_source_files_properties(${SERVICE_SOURCES} main.cpp PROPERTIES COMPILE_FLAGS "${CXX_WARNING_ARGS} -g -std=c++11") +set_source_files_properties(${SERVICE_SOURCES} main.cpp PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -g -std=c++11") target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES} ${GCOV_LIBS} ${URLDISPATCHER_LIBRARIES}) install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}) -- cgit v1.2.3 From b440e7581fa2c22d34b4bd2e838598653255d881 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 26 Apr 2021 17:01:52 +0200 Subject: src/clock-live.cpp: Replace 'signed size_t' by 'ssize_t'. --- src/clock-live.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/clock-live.cpp b/src/clock-live.cpp index 74cf344..b6d7c12 100644 --- a/src/clock-live.cpp +++ b/src/clock-live.cpp @@ -143,7 +143,7 @@ private: auto now_str = g_date_time_format(now, "%F %T"); g_debug("%s triggered at %s.%06d by GIOCondition %d, read %zd bytes, found %zu interrupts", G_STRFUNC, now_str, g_date_time_get_microsecond(now), - (int)cond, (signed size_t)n_bytes, (size_t)n_interrupts); + (int)cond, (ssize_t)n_bytes, (size_t)n_interrupts); g_free(now_str); g_date_time_unref(now); -- cgit v1.2.3 From fdd18c9d53ca50b435c5965f748b2c32a745e8a7 Mon Sep 17 00:00:00 2001 From: Nicholas Guriev Date: Sat, 24 Apr 2021 23:10:17 +0300 Subject: Various tests fixes * Provide default EdsEngine constructor for autotests. * Temporary disable DST related tests. Something strange happens there. * Do not create locale datetime for more reliable result on non-UTC systems. * Specify audio_url for sample Alarms. Fixes AyatanaIndicators/ayatana-indicator-datetime#32 --- src/engine-eds.cpp | 5 +++++ src/main.cpp | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/engine-eds.cpp b/src/engine-eds.cpp index 277c090..709bb4d 100644 --- a/src/engine-eds.cpp +++ b/src/engine-eds.cpp @@ -1245,6 +1245,11 @@ private: **** ***/ +EdsEngine::EdsEngine(): + p(new Impl(std::shared_ptr(new Myself))) +{ +} + EdsEngine::EdsEngine(const std::shared_ptr &myself): p(new Impl(myself)) { diff --git a/src/main.cpp b/src/main.cpp index 0da55a2..fdd84b5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -61,7 +60,7 @@ namespace if (!g_strcmp0("lightdm", g_get_user_name())) engine.reset(new MockEngine); else - engine.reset(new EdsEngine(std::shared_ptr(new Myself))); + engine.reset(new EdsEngine); return engine; } -- cgit v1.2.3