summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-18 12:33:55 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-18 12:34:58 +0100
commit8e04a08869cfec0f0473137e580b8571f793da14 (patch)
tree3d47ec730f5624b44938b228955d06fc283fe079
parent364c1ecd8703dadaaa9c7479335e469b153a1be0 (diff)
fix -Wall -Wextra -Wpedantic
-rw-r--r--ext-falcon-bms-linear-acc/falcon-bms-ext.cpp1
-rw-r--r--logic/extensions.cpp1
-rw-r--r--spline/spline.cpp4
3 files changed, 4 insertions, 2 deletions
diff --git a/ext-falcon-bms-linear-acc/falcon-bms-ext.cpp b/ext-falcon-bms-linear-acc/falcon-bms-ext.cpp
index aec8f83c..b6a32540 100644
--- a/ext-falcon-bms-linear-acc/falcon-bms-ext.cpp
+++ b/ext-falcon-bms-linear-acc/falcon-bms-ext.cpp
@@ -11,4 +11,5 @@ falcon_bms_acceleration_ext::falcon_bms_acceleration_ext()
void falcon_bms_acceleration_ext::process_finished(Pose& p)
{
+ (void)p;
}
diff --git a/logic/extensions.cpp b/logic/extensions.cpp
index 3a2271f8..395d35ce 100644
--- a/logic/extensions.cpp
+++ b/logic/extensions.cpp
@@ -23,6 +23,7 @@ static constexpr struct event_type_mapping
bool event_handler::is_enabled(const QString& name)
{
+ (void)name;
#if 1
return true;
#else
diff --git a/spline/spline.cpp b/spline/spline.cpp
index 2fe73a01..b6fdd9c5 100644
--- a/spline/spline.cpp
+++ b/spline/spline.cpp
@@ -188,8 +188,8 @@ void spline::update_interp_data()
{
const double x = points[0].x();
const double y = points[0].y();
- const int max = clamp(iround(x * c), 1, value_count-1);
- for (int k = 0; k <= max; k++)
+ const unsigned max = (unsigned)clamp(iround(x * c), 1, value_count-1);
+ for (unsigned k = 0; k <= max; k++)
{
if (k < value_count)
data[unsigned(k)] = float(y * k / max);