From bfc0251b1e448ea595b5837c46cb5656bc666ec4 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Fri, 11 Feb 2022 15:24:06 +0100 Subject: Fix build warnings --- CMakeLists.txt | 2 ++ include/datetime/timezone-geoclue.h | 4 +++- src/wakeup-timer-powerd.cpp | 4 +--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba6ebfa..6daef80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,8 @@ else() add_definitions("-Wall") endif() +add_definitions("-Wno-sign-compare") # Needed for GTest on Ubuntu + ## ## GNU standard installation directories ## diff --git a/include/datetime/timezone-geoclue.h b/include/datetime/timezone-geoclue.h index 18fc159..d25d3e5 100644 --- a/include/datetime/timezone-geoclue.h +++ b/include/datetime/timezone-geoclue.h @@ -1,5 +1,6 @@ /* * Copyright 2013 Canonical Ltd. + * Copyright 2022 Robert Tari * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -15,6 +16,7 @@ * * Authors: * Charles Kerr + * Robert Tari */ #ifndef INDICATOR_DATETIME_GEOCLUE_TIMEZONE_H @@ -36,7 +38,7 @@ public: ~GeoclueTimezone(); private: - struct Impl; + class Impl; std::unique_ptr impl; // we've got pointers in here, so don't allow copying diff --git a/src/wakeup-timer-powerd.cpp b/src/wakeup-timer-powerd.cpp index f775999..77893c8 100644 --- a/src/wakeup-timer-powerd.cpp +++ b/src/wakeup-timer-powerd.cpp @@ -1,6 +1,6 @@ /* * Copyright 2014 Canonical Ltd. - * Copyright 2021 Robert Tari + * Copyright 2021-2022 Robert Tari * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -41,7 +41,6 @@ class PowerdWakeupTimer::Impl public: explicit Impl(const std::shared_ptr& clock): - m_clock(clock), m_cancellable(g_cancellable_new()) { g_bus_get(G_BUS_TYPE_SYSTEM, m_cancellable, on_bus_ready, this); @@ -271,7 +270,6 @@ private: ***/ core::Signal<> m_timeout; - const std::shared_ptr& m_clock; DateTime m_wakeup_time; std::shared_ptr m_bus; -- cgit v1.2.3 From 20dbe77b8382c53650dffa0bf78a71c43d848d5d Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Fri, 11 Feb 2022 15:26:30 +0100 Subject: .build.yml: Build with -Werror --- .build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.build.yml b/.build.yml index cba0170..fe8c462 100644 --- a/.build.yml +++ b/.build.yml @@ -231,11 +231,11 @@ build_scripts: - - if [ -e ./CMakeLists.txt ]; then - if [ ${DISTRO_NAME} == "debian" ]; then - - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON -DENABLE_LOMIRI_FEATURES=ON + - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_WERROR=ON -DENABLE_TESTS=ON -DENABLE_LOMIRI_FEATURES=ON - elif [ ${DISTRO_NAME} == "ubuntu" ]; then - - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON + - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_WERROR=ON -DENABLE_TESTS=ON - else - - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON + - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_WERROR=ON - fi - else - exit 1 -- cgit v1.2.3