diff --git a/src/renderloop.cpp b/src/renderloop.cpp index caa25228dc..c583b54df1 100644 --- a/src/renderloop.cpp +++ b/src/renderloop.cpp @@ -127,8 +127,10 @@ void RenderLoopPrivate::notifyFrameCompleted(std::chrono::nanoseconds timestamp) if (lastPresentationTimestamp <= timestamp) { lastPresentationTimestamp = timestamp; } else { - qCWarning(KWIN_CORE, "Got invalid presentation timestamp: %ld (current %ld)", - timestamp.count(), lastPresentationTimestamp.count()); + qCWarning(KWIN_CORE, + "Got invalid presentation timestamp: %lld (current %lld)", + static_cast(timestamp.count()), + static_cast(lastPresentationTimestamp.count())); lastPresentationTimestamp = std::chrono::steady_clock::now().time_since_epoch(); } diff --git a/src/scene.cpp b/src/scene.cpp index 9f86c0b7ed..bce81cf646 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -176,8 +176,10 @@ void Scene::paintScreen(const QRegion &damage, const QRegion &repaint, std::chrono::duration_cast(renderLoop->nextPresentationTimestamp()); if (Q_UNLIKELY(presentTime < m_expectedPresentTimestamp)) { - qCDebug(KWIN_CORE, "Provided presentation timestamp is invalid: %ld (current: %ld)", - presentTime.count(), m_expectedPresentTimestamp.count()); + qCDebug(KWIN_CORE, + "Provided presentation timestamp is invalid: %lld (current: %lld)", + static_cast(presentTime.count()), + static_cast(m_expectedPresentTimestamp.count())); } else { m_expectedPresentTimestamp = presentTime; }