Commit ec554de6 authored by Allan Sandfeld Jensen's avatar Allan Sandfeld Jensen Committed by Kevin Funk
Browse files

Fix cast-function-type gcc 8 warning


Gcc 8 now warns against casting functions taking references to
functions taking pointers:

warning: cast between incompatible function types from ‘QVariant (*)(const int&, const int&, double)’ to
‘QVariant (*)(const void*, const void*, double)’ [-Werror=cast-function-type]

Suppressed by casting over void(*)().

Change-Id: I48bee53253b8e87110e8a49efa761fc2add89c5a
Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0ffc3980

)
Reviewed-by: default avatarAllan Sandfeld Jensen <allan.jensen@qt.io>
No related merge requests found
Showing with 1 addition and 1 deletion
......@@ -113,7 +113,7 @@ private:
template <typename T>
void qRegisterAnimationInterpolator(QVariant (*func)(const T &from, const T &to, qreal progress)) {
QVariantAnimation::registerInterpolator(reinterpret_cast<QVariantAnimation::Interpolator>(func), qMetaTypeId<T>());
QVariantAnimation::registerInterpolator(reinterpret_cast<QVariantAnimation::Interpolator>(reinterpret_cast<void(*)()>(func)), qMetaTypeId<T>());
}
#endif //QT_NO_ANIMATION
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment