From 86e06b615e11677bf2b1e83d1f46754946006e41 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Sat, 7 Dec 2013 16:40:42 +0100 Subject: [PATCH] cppcheck warning-- --- src/abstractclipitem.cpp | 6 ++---- src/clipmanager.cpp | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/abstractclipitem.cpp b/src/abstractclipitem.cpp index 966604cf..a616219c 100644 --- a/src/abstractclipitem.cpp +++ b/src/abstractclipitem.cpp @@ -357,11 +357,9 @@ int AbstractClipItem::mouseOverKeyFrames(QPointF pos, double maxOffset) double maxh = br.height() / 100.0 * m_keyframeFactor; if (m_keyframes.count() > 0) { QMap::const_iterator i = m_keyframes.constBegin(); - double x1; - double y1; while (i != m_keyframes.constEnd()) { - x1 = br.x() + maxw * (i.key() - cropStart().frames(m_fps)); - y1 = br.bottom() - (i.value() - m_keyframeOffset) * maxh; + double x1 = br.x() + maxw * (i.key() - cropStart().frames(m_fps)); + double y1 = br.bottom() - (i.value() - m_keyframeOffset) * maxh; if (qAbs(pos.x() - x1) < maxOffset && qAbs(pos.y() - y1) < 10) { setToolTip('[' + QString::number((GenTime(i.key(), m_fps) - cropStart()).seconds(), 'f', 2) + i18n("seconds") + ", " + QString::number(i.value(), 'f', 1) + ']'); return i.key(); diff --git a/src/clipmanager.cpp b/src/clipmanager.cpp index 9a394028..b5932d6d 100644 --- a/src/clipmanager.cpp +++ b/src/clipmanager.cpp @@ -335,12 +335,11 @@ void ClipManager::slotGetAudioThumbs() } int last_val = 0; - int val = 0; double framesPerSecond = mlt_producer_get_fps(producer.get_producer()); Mlt::Frame *mlt_frame; for (int z = (int) frame; z < (int)(frame + lengthInFrames) && producer.is_valid() && !m_abortAudioThumb; z++) { - val = (int)((z - frame) / (frame + lengthInFrames) * 100.0); + int val = (int)((z - frame) / (frame + lengthInFrames) * 100.0); if (last_val != val && val > 1) { setThumbsProgress(i18n("Creating audio thumbnail for %1", url.fileName()), val); last_val = val; @@ -960,7 +959,7 @@ void ClipManager::listRemovableVolumes() bool ClipManager::isOnRemovableDevice(const KUrl &url) { - SolidVolumeInfo volume; + //SolidVolumeInfo volume; QString path = url.path(KUrl::RemoveTrailingSlash); int volumeMatch = 0; @@ -974,7 +973,7 @@ bool ClipManager::isOnRemovableDevice(const KUrl &url) if (length > volumeMatch) { volumeMatch = v.path.length(); - volume = v; + //volume = v; } } } -- 2.39.2