/data/project/giucam/orbital/src/client/services/hardware/solidbackend.cpp: In function 'Battery::ChargeState fromSolid(Solid::Battery::ChargeState)':
/data/project/giucam/orbital/src/client/services/hardware/solidbackend.cpp:84:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1plus: some warnings being treated as errors
my monkey patch shown as below:
diff --git a/src/client/services/hardware/solidbackend.cpp b/src/client/services/hardware/solidbackend.cpp
index 4adea6e..082e6d1 100644
--- a/src/client/services/hardware/solidbackend.cpp
+++ b/src/client/services/hardware/solidbackend.cpp
@@ -80,6 +80,7 @@ static Battery::ChargeState fromSolid(Solid::Battery::ChargeState c)
case Solid::Battery::Charging: return Battery::ChargeState::Charging;
case Solid::Battery::Discharging: return Battery::ChargeState::Discharging;
}
+ return Battery::ChargeState::Stable;
}
SolidBattery::SolidBattery(Solid::Battery *b, const QString &udi)
/data/project/giucam/orbital/src/client/services/hardware/solidbackend.cpp: In function 'Battery::ChargeState fromSolid(Solid::Battery::ChargeState)': /data/project/giucam/orbital/src/client/services/hardware/solidbackend.cpp:84:1: error: control reaches end of non-void function [-Werror=return-type] } ^ cc1plus: some warnings being treated as errors
my monkey patch shown as below:
PS: I often use _-Werror_ to cleanup my code ;P https://github.com/xiangzhai/qwx/blob/android/qwx.pro#L11