Fix more compiler warnings

This commit is contained in:
elecpower
2021-12-31 10:53:09 +01:00
committed by Raphael Coeffic
parent f33d5c005e
commit d636487663
2 changed files with 4 additions and 4 deletions
@@ -75,7 +75,7 @@ struct YamlThrTrace {
Boards board(getCurrentBoard());
int pots = board.getCapability(Board::Pots);
int sliders = board.getCapability(Board::Sliders);
if (cpn_value < pots + sliders) {
if (cpn_value < (unsigned int)(pots + sliders)) {
src = RawSource(SOURCE_TYPE_STICK, 4/* sticks */ + cpn_value);
}
else {
@@ -198,7 +198,7 @@ struct convert<YamlTrim> {
return true;
}
};
template <>
struct convert<FlightModeData> {
static Node encode(const FlightModeData& rhs)
+2 -2
View File
@@ -99,7 +99,7 @@ void operator>>(const YAML::Node& node, T (&value)[N])
for (const auto& elmt : node) {
try {
int idx = std::stoi(elmt.first.Scalar());
if (idx < 0 || idx >= N) return;
if (idx < 0 || idx >= (int)N) return;
elmt.second >> value[idx];
} catch (...) {
@@ -134,7 +134,7 @@ struct convert_array
return node;
}
};
template <typename T>
struct convert_enum
{