]> git.sesse.net Git - kdenlive/commitdiff
cppcheck warning--
authorMontel Laurent <montel@kde.org>
Sat, 7 Dec 2013 15:40:42 +0000 (16:40 +0100)
committerMontel Laurent <montel@kde.org>
Sat, 7 Dec 2013 15:40:42 +0000 (16:40 +0100)
src/abstractclipitem.cpp
src/clipmanager.cpp

index 966604cf34a1224a3b8135f4813f443858ed4b33..a616219cf4e9d6e71909129e419f5e82d16e7aa8 100644 (file)
@@ -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<int, int>::const_iterator i = m_keyframes.constBegin();
     double maxh = br.height() / 100.0 * m_keyframeFactor;
     if (m_keyframes.count() > 0) {
         QMap<int, int>::const_iterator i = m_keyframes.constBegin();
-        double x1;
-        double y1;
         while (i != m_keyframes.constEnd()) {
         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();
             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();
index 9a394028a71f3f1d591be73959c9cb7355963d38..b5932d6dddd3e0c1ea38e0020dc6d31ba9576f29 100644 (file)
@@ -335,12 +335,11 @@ void ClipManager::slotGetAudioThumbs()
         }
 
         int last_val = 0;
         }
 
         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++) {
         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;
             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)
 {
 
 bool ClipManager::isOnRemovableDevice(const KUrl &url)
 {
-    SolidVolumeInfo volume;
+    //SolidVolumeInfo volume;
     QString path = url.path(KUrl::RemoveTrailingSlash);
     int volumeMatch = 0;
 
     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();
             if (length > volumeMatch)
             {
                 volumeMatch = v.path.length();
-                volume = v;
+                //volume = v;
             }
         }
     }
             }
         }
     }