2653fe4
From 783525be485838dd5a2884c1b2f33c5cebdadd1a Mon Sep 17 00:00:00 2001
2653fe4
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
2653fe4
Date: Sat, 1 Jul 2017 10:14:14 +0200
2653fe4
Subject: [PATCH 1/3] Fix warning: 'bool trip_sort' defined but not used
2653fe4
 [-Wunused-function]
2653fe4
2653fe4
---
2653fe4
 src/thd_trip_point.h | 4 ----
2653fe4
 src/thd_zone.cpp     | 4 ++++
2653fe4
 2 files changed, 4 insertions(+), 4 deletions(-)
2653fe4
2653fe4
diff --git a/src/thd_trip_point.h b/src/thd_trip_point.h
2653fe4
index 7981d58..cf24d15 100644
2653fe4
--- a/src/thd_trip_point.h
2653fe4
+++ b/src/thd_trip_point.h
2653fe4
@@ -171,8 +171,4 @@ class cthd_trip_point {
2653fe4
 		}
2653fe4
 	}
2653fe4
 };
2653fe4
-
2653fe4
-static bool trip_sort(cthd_trip_point trip1, cthd_trip_point trip2) {
2653fe4
-	return (trip1.get_trip_temp() < trip2.get_trip_temp());
2653fe4
-}
2653fe4
 #endif
2653fe4
diff --git a/src/thd_zone.cpp b/src/thd_zone.cpp
2653fe4
index 9f327fd..31dd3ea 100644
2653fe4
--- a/src/thd_zone.cpp
2653fe4
+++ b/src/thd_zone.cpp
2653fe4
@@ -34,6 +34,10 @@
2653fe4
 #include "thd_zone.h"
2653fe4
 #include "thd_engine.h"
2653fe4
 
2653fe4
+static bool trip_sort(cthd_trip_point trip1, cthd_trip_point trip2) {
2653fe4
+	return (trip1.get_trip_temp() < trip2.get_trip_temp());
2653fe4
+}
2653fe4
+
2653fe4
 cthd_zone::cthd_zone(int _index, std::string control_path, sensor_relate_t rel) :
2653fe4
 		index(_index), zone_sysfs(control_path.c_str()), zone_temp(0), zone_active(
2653fe4
 				false), zone_cdev_binded_status(false), type_str(), sensor_rel(
2653fe4
2653fe4
From 6384069b9373d87dba64d12aab1a782c498eff67 Mon Sep 17 00:00:00 2001
2653fe4
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
2653fe4
Date: Sat, 1 Jul 2017 10:20:25 +0200
2653fe4
Subject: [PATCH 2/3] Fix warning: unused variable 'enabled'
2653fe4
 [-Wunused-variable]
2653fe4
2653fe4
---
2653fe4
 src/thd_cdev_modem.cpp | 1 -
2653fe4
 1 file changed, 1 deletion(-)
2653fe4
2653fe4
diff --git a/src/thd_cdev_modem.cpp b/src/thd_cdev_modem.cpp
2653fe4
index a56e8e1..b466da5 100644
2653fe4
--- a/src/thd_cdev_modem.cpp
2653fe4
+++ b/src/thd_cdev_modem.cpp
2653fe4
@@ -173,7 +173,6 @@ int cthd_cdev_modem::get_modem_property(DBusConnection* conn,
2653fe4
 		DBusMessageIter key, var;
2653fe4
 
2653fe4
 		char *property_name;
2653fe4
-		dbus_bool_t enabled;
2653fe4
 
2653fe4
 		dbus_message_iter_recurse(&dict, &key);
2653fe4
 
2653fe4
2653fe4
From 9250e90645215001ba2171ef2770723c47e13d79 Mon Sep 17 00:00:00 2001
2653fe4
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
2653fe4
Date: Sat, 1 Jul 2017 10:23:21 +0200
2653fe4
Subject: [PATCH 3/3] Enable -Werror to keep code clean
2653fe4
2653fe4
---
2653fe4
 Android.mk  | 2 +-
2653fe4
 Makefile.am | 5 +++--
2653fe4
 2 files changed, 4 insertions(+), 3 deletions(-)
2653fe4
2653fe4
diff --git a/Android.mk b/Android.mk
2653fe4
index 1a40bda..8612682 100644
2653fe4
--- a/Android.mk
2653fe4
+++ b/Android.mk
2653fe4
@@ -37,7 +37,7 @@ LOCAL_SRC_FILES := \
2653fe4
 LOCAL_C_INCLUDES += external/libxml2/include
2653fe4
 
2653fe4
 LOCAL_MODULE_TAGS := optional
2653fe4
-LOCAL_CFLAGS := -DTDRUNDIR='"/data/thermal-daemon"' -DTDCONFDIR='"/system/etc/thermal-daemon"' -Wno-unused-parameter
2653fe4
+LOCAL_CFLAGS := -DTDRUNDIR='"/data/thermal-daemon"' -DTDCONFDIR='"/system/etc/thermal-daemon"' -Wno-unused-parameter -Werror
2653fe4
 LOCAL_STATIC_LIBRARIES := libxml2
2653fe4
 LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libc++ libicuuc libicui18n libbinder libutils
2653fe4
 LOCAL_PRELINK_MODULE := false
2653fe4
diff --git a/Makefile.am b/Makefile.am
2653fe4
index ee96893..e76c163 100644
2653fe4
--- a/Makefile.am
2653fe4
+++ b/Makefile.am
2653fe4
@@ -14,8 +14,9 @@ AM_CXXFLAGS = ${DBUS_CFLAGS}\
2653fe4
 		-Wreorder \
2653fe4
 		-Wsign-compare \
2653fe4
 		-Wreturn-type \
2653fe4
-		-Wunused-but-set-variable\
2653fe4
-		-Wformat
2653fe4
+		-Wunused-but-set-variable \
2653fe4
+		-Wformat \
2653fe4
+		-Werror
2653fe4
 
2653fe4
 EXTRA_DIST=Makefile.glib \
2653fe4
 	thermald.pc.in