]> git.sesse.net Git - kdenlive/commitdiff
Fix a couple of compile warnings because of unused and uninitialized variables.
authorTill Theato <root@ttill.de>
Sun, 24 Jul 2011 12:10:35 +0000 (12:10 +0000)
committerTill Theato <root@ttill.de>
Sun, 24 Jul 2011 12:10:35 +0000 (12:10 +0000)
svn path=/trunk/kdenlive/; revision=5806

src/audioscopes/ffttools.cpp
src/clipproperties.cpp
src/colorcorrection/vectorscopegenerator.cpp
src/colortools.cpp
src/customtrackview.cpp
src/dvdwizardmenu.cpp
src/graphicsscenerectmove.cpp
src/headertrack.cpp
src/renderwidget.cpp
src/stopmotion/stopmotion.cpp
src/v4l/src.c

index b16106f26eb2d9162dc7a78379b04c5ddb35b967..3d1ae83fb624dba7639e56deca026735dbedffc7 100644 (file)
@@ -292,7 +292,7 @@ const QVector<float> FFTTools::interpolatePeakPreserving(const QVector<float> in
         // If there are more than 2 samples per pixel in average, then use the maximum of them
         // since by only looking at the left sample we might miss some maxima.
         uint src = left;
-        int xi_prev = 0;
+//         int xi_prev = 0;
         int points;
 
 #ifdef DEBUG_FFTTOOLS
@@ -316,7 +316,7 @@ const QVector<float> FFTTools::interpolatePeakPreserving(const QVector<float> in
                 points++;
             }
 
-            xi_prev = xi;
+//             xi_prev = xi;
         }
     }
     // Fill the rest of the vector if the right border exceeds the input vector.
index f9d79573a2b0d2e329899e1a86debb49daa39a1e..f0f3e05181123d62affaf61e1bf1259932b48712 100644 (file)
@@ -269,7 +269,6 @@ ClipProperties::ClipProperties(DocClipBase *clip, Timecode tc, double fps, QWidg
         m_view.clip_color->setColor(QColor('#' + props.value("colour").right(8).left(6)));
         connect(m_view.clip_color, SIGNAL(changed(QColor)), this, SLOT(slotModified()));
     } else if (t == SLIDESHOW) {
-        bool isMime = true;
         if (url.fileName().startsWith(".all.")) {
             // the image sequence is defined by mimetype
             m_view.clip_path->setText(url.directory());
@@ -278,7 +277,6 @@ ClipProperties::ClipProperties(DocClipBase *clip, Timecode tc, double fps, QWidg
             m_view.slide_type_label->setHidden(true);
             m_view.image_type->setHidden(true);
             m_view.clip_path->setText(url.path());
-            isMime = false;
         }
 
         m_view.tabWidget->removeTab(METATAB);
index 9f3a9bd1f7f40e0896ccd414b8da36866a8d40f9..4ee5eccc1c41b71434b101fa19d0f11a9a8e51b2 100644 (file)
@@ -134,7 +134,7 @@ QImage VectorscopeGenerator::calculateVectorscope(const QSize &vectorscopeSize,
 
     int r,g,b;
     double dy, dr, dg, db, dmax;
-    double y,u,v;
+    double /*y,*/ u, v;
     QPoint pt;
     QRgb px;
 
@@ -153,12 +153,13 @@ QImage VectorscopeGenerator::calculateVectorscope(const QSize &vectorscopeSize,
 
         switch (colorSpace) {
         case VectorscopeGenerator::ColorSpace_YUV:
-            y = (double)  0.001173 * r +0.002302 * g +0.0004471* b;
+//             y = (double)  0.001173 * r +0.002302 * g +0.0004471* b;
             u = (double) -0.0005781* r -0.001135 * g +0.001713 * b;
             v = (double)  0.002411 * r -0.002019 * g -0.0003921* b;
             break;
         case VectorscopeGenerator::ColorSpace_YPbPr:
-            y = (double)  0.001173 * r +0.002302 * g +0.0004471* b;
+        default:
+//             y = (double)  0.001173 * r +0.002302 * g +0.0004471* b;
             u = (double) -0.0006671* r -0.001299 * g +0.0019608* b;
             v = (double)  0.001961 * r -0.001642 * g -0.0003189* b;
             break;
@@ -187,6 +188,7 @@ QImage VectorscopeGenerator::calculateVectorscope(const QSize &vectorscopeSize,
                     db = dy + 517.2*u;
                     break;
                 case VectorscopeGenerator::ColorSpace_YPbPr:
+                default:
                     dr = dy + 357.5*v;
                     dg = dy - 87.75*u - 182*v;
                     db = dy + 451.9*u;
@@ -215,6 +217,7 @@ QImage VectorscopeGenerator::calculateVectorscope(const QSize &vectorscopeSize,
                     db = dy + 517.2*u;
                     break;
                 case VectorscopeGenerator::ColorSpace_YPbPr:
+                default:
                     dr = dy + 357.5*v;
                     dg = dy - 87.75*u - 182*v;
                     db = dy + 451.9*u;
index d618e5383499a37223a51425ccac2407543b1fef..4353c790d9b32ad3fe0b474d1c59d742fb13a760 100644 (file)
@@ -291,7 +291,7 @@ QImage ColorTools::hsvCurvePlane(const QSize &size, const QColor &baseColor,
     Q_ASSERT(size.width() > 0);
     Q_ASSERT(size.height() > 0);
 
-    int xMax, yMax;
+    /*int xMax, yMax;
 
     switch(xVariant) {
     case COM_H:
@@ -311,7 +311,7 @@ QImage ColorTools::hsvCurvePlane(const QSize &size, const QColor &baseColor,
     case COM_V:
         yMax = 256;
         break;
-    }
+    }*/
 
 
     QImage plane(size, QImage::Format_ARGB32);
index 5eb7a0915088cfcfe2773f81935bff40269775cb..2378a79db50ceb21aeb835ec65ec1ef0daefe452 100644 (file)
@@ -701,7 +701,6 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event)
 
     m_blockRefresh = true;
     m_dragGuide = NULL;
-    bool collision = false;
 
     if (m_tool != RAZORTOOL) activateMonitor();
     else if (m_document->renderer()->playSpeed() != 0.0) {
@@ -729,7 +728,6 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event)
             m_dragGuide = (Guide *) collisionList.at(i);
             if (event->button() == Qt::LeftButton) { // move it
                 m_dragGuide->setFlag(QGraphicsItem::ItemIsMovable, true);
-                collision = true;
                 m_operationMode = MOVEGUIDE;
                 // deselect all clips so that only the guide will move
                 m_scene->clearSelection();
@@ -3769,7 +3767,6 @@ void CustomTrackView::deleteSelectedClips()
     scene()->clearSelection();
     QUndoCommand *deleteSelected = new QUndoCommand();
 
-    bool resetGroup = false;
     int groupCount = 0;
     int clipCount = 0;
     int transitionCount = 0;
@@ -3780,7 +3777,6 @@ void CustomTrackView::deleteSelectedClips()
             QList<QGraphicsItem *> children = itemList.at(i)->childItems();
             QList <ItemInfo> clipInfos;
             QList <ItemInfo> transitionInfos;
-            GenTime currentPos = GenTime(m_cursorPos, m_document->fps());
             for (int j = 0; j < children.count(); j++) {
                 if (children.at(j)->type() == AVWIDGET) {
                     AbstractClipItem *clip = static_cast <AbstractClipItem *>(children.at(j));
@@ -3806,7 +3802,6 @@ void CustomTrackView::deleteSelectedClips()
         if (itemList.at(i)->type() == AVWIDGET) {
             clipCount++;
             ClipItem *item = static_cast <ClipItem *>(itemList.at(i));
-            if (item->parentItem()) resetGroup = true;
             //kDebug()<<"// DELETE CLP AT: "<<item->info().startPos.frames(25);
             new AddTimelineClipCommand(this, item->xml(), item->clipProducer(), item->info(), item->effectList(), false, false, true, true, deleteSelected);
             emit clipItemSelected(NULL);
@@ -3814,7 +3809,6 @@ void CustomTrackView::deleteSelectedClips()
             transitionCount++;
             Transition *item = static_cast <Transition *>(itemList.at(i));
             //kDebug()<<"// DELETE TRANS AT: "<<item->info().startPos.frames(25);
-            if (item->parentItem()) resetGroup = true;
             new AddTransitionCommand(this, item->info(), item->transitionEndTrack(), item->toXML(), true, true, deleteSelected);
             emit transitionItemSelected(NULL);
         }
@@ -3845,7 +3839,6 @@ void CustomTrackView::changeClipSpeed()
     for (int i = 0; i < itemList.count(); i++) {
         if (itemList.at(i)->type() == AVWIDGET) {
             ClipItem *item = static_cast <ClipItem *>(itemList.at(i));
-            ItemInfo info = item->info();
             if (percent == -1) percent = QInputDialog::getInteger(this, i18n("Edit Clip Speed"), i18n("New speed (percents)"), item->speed() * 100, 1, 10000, 1, &ok);
             if (!ok) break;
             double speed = (double) percent / 100.0;
@@ -3995,7 +3988,6 @@ void CustomTrackView::groupClips(bool group)
     QList<QGraphicsItem *> itemList = scene()->selectedItems();
     QList <ItemInfo> clipInfos;
     QList <ItemInfo> transitionInfos;
-    GenTime currentPos = GenTime(m_cursorPos, m_document->fps());
 
     // Expand groups
     int max = itemList.count();
index 89ce70c7f68eb06cb3a67a696ead928095ef3823..625754c6b24bef9aced3391d5b6a314d9a9edfe0 100644 (file)
@@ -640,7 +640,6 @@ void DvdWizardMenu::loadXml(QDomElement xml)
         button->setBackMenu(e.attribute("backtomenu").toInt());
         button->setDefaultTextColor(m_view.text_color->color());
         button->setZValue(4);
-        QRectF r = button->sceneBoundingRect();
         m_scene->addItem(button);
         button->setPos(e.attribute("posx").toDouble(), e.attribute("posy").toDouble());
 
index a905d1ae13ab140911b771b2ed27eb66208f6886..99f93eeb0a12c5e3dd6bf9bb80e458b05c09aa9d 100644 (file)
@@ -154,14 +154,12 @@ void GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent* e)
     m_resizeMode = NoResize;
     const QList <QGraphicsItem *> list = items(QRectF(p , QSizeF(4, 4)).toRect());
     QGraphicsItem *item = NULL;
-    bool hasSelected = false;
 
     if (m_tool == TITLE_SELECT) {
         foreach(QGraphicsItem *g, list) {
             kDebug() << " - - CHECKING ITEM Z:" << g->zValue() << ", TYPE: " << g->type();
             // check is there is a selected item in list
             if (g->zValue() > -1000 && g->isSelected()) {
-                hasSelected = true;
                 item = g;
                 break;
             }
index 3cc057a603fea651a9f2e94d537d2b28bf1263eb..64876175239b521b06b0b6bc66b7e7fb81e9ee12 100644 (file)
@@ -120,7 +120,6 @@ HeaderTrack::HeaderTrack(int index, TrackInfo info, int height, QWidget *parent)
 
 void HeaderTrack::updateEffectLabel(QStringList effects)
 {
-    QColor col = track_number->palette().color(QPalette::Base);
     if (!effects.isEmpty()) {
         effect_label->setHidden(false);
         effect_label->setToolTip(effects.join("/"));
index 8c2f9e9d3c5fdbd0388a0e308679acc01ad40689..a654bc6038870e6f8ca979de5a7c07541110b661 100644 (file)
@@ -1720,12 +1720,12 @@ void RenderWidget::parseScriptFiles()
         item->setData(1, Qt::UserRole, KUrl(target).path());
         item->setData(1, Qt::UserRole + 1, scriptpath.path());
     }
-    bool activate = false;
+//     bool activate = false;
     QTreeWidgetItem *script = m_view.scripts_list->topLevelItem(0);
     if (script) {
         m_view.scripts_list->setCurrentItem(script);
         script->setSelected(true);
-        activate = true;
+//         activate = true;
     }
 //    m_view.start_script->setEnabled(activate);
 //    m_view.delete_script->setEnabled(activate);
index 1055d0c2d219815be59c517f1b905e9cb7f456e8..a018fe76b9451eb03052f6613baa87ac21474582 100644 (file)
@@ -885,6 +885,7 @@ void StopmotionWidget::slotSwitchMirror(bool isOn)
 
 const QString StopmotionWidget::createProducer(MltVideoProfile profile, const QString service, const QString resource)
 {
+    Q_UNUSED(profile)
 
     QString playlist = "<mlt title=\"capture\"><producer id=\"producer0\" in=\"0\" out=\"99999\"><property name=\"mlt_type\">producer</property><property name=\"length\">100000</property><property name=\"eof\">pause</property><property name=\"resource\">" + resource + "</property><property name=\"mlt_service\">" + service + "</property></producer>";
 
index f83dfdfbc4bc43709c3e81f99ef96b404d4bd412..b265b989f746ec80628f2fc40e9253b8207c1d52 100644 (file)
@@ -25,7 +25,7 @@
 int v4l2_free_mmap(src_t *src)
 {
         src_v4l2_t *s = (src_v4l2_t *) src->state;
-        int i;
+        uint i;
 
         for(i = 0; i < s->req.count; i++)
                 munmap(s->buffer[i].start, s->buffer[i].length);