]> git.sesse.net Git - kdenlive/commitdiff
Fix some compilation warnings
authorTill Theato <root@ttill.de>
Sun, 10 Oct 2010 09:05:59 +0000 (09:05 +0000)
committerTill Theato <root@ttill.de>
Sun, 10 Oct 2010 09:05:59 +0000 (09:05 +0000)
svn path=/trunk/kdenlive/; revision=4976

src/blackmagic/capture.cpp
src/blackmagic/capture.h
src/blackmagic/devices.cpp
src/blackmagic/include/LinuxCOM.h
src/onmonitoritems/onmonitorrectitem.cpp
src/projectlist.cpp
src/stopmotion/stopmotion.cpp

index 6b93efe0469fabb30a273df28c7e13819aa3c4ff..e6e618c5035f9de65438d26bcc7c43ca4ffc8ed6 100644 (file)
@@ -322,6 +322,7 @@ void        CDeckLinkGLWidget::resizeGL (int width, int height)
 
 HRESULT                CDeckLinkGLWidget::QueryInterface (REFIID iid, LPVOID *ppv)
 {
+        Q_UNUSED(iid);
        *ppv = NULL;
        return E_NOINTERFACE;
 }
@@ -489,6 +490,8 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame
 
 HRESULT DeckLinkCaptureDelegate::VideoInputFormatChanged(BMDVideoInputFormatChangedEvents events, IDeckLinkDisplayMode *mode, BMDDetectedVideoInputFormatFlags)
 {
+    Q_UNUSED(events);
+    Q_UNUSED(mode);
     return S_OK;
 }
 
@@ -555,15 +558,15 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFormatChanged(BMDVideoInputFormatChan
 
 
 CaptureHandler::CaptureHandler(QVBoxLayout *lay, QWidget *parent):
-    m_layout(lay)
-    , m_parent(parent)
-    , previewView(NULL)
-    , deckLinkInput(NULL)
-    , displayModeIterator(NULL)
-    , deckLink(NULL)
-    , displayMode(NULL)
-    , delegate(NULL)
-    , deckLinkIterator(NULL)
+    previewView(NULL),
+    deckLinkIterator(NULL),
+    delegate(NULL),
+    displayMode(NULL),
+    deckLink(NULL),
+    deckLinkInput(NULL),
+    displayModeIterator(NULL),
+    m_layout(lay),
+    m_parent(parent)
 {
 }
 
@@ -575,9 +578,9 @@ void CaptureHandler::startPreview(int deviceId, int captureMode)
        BMDPixelFormat                          pixelFormat = bmdFormat8BitYUV;
        int                                                     displayModeCount = 0;
        int                                                     exitStatus = 1;
-       int                                                     ch;
+       //int                                                   ch;
        bool                                            foundDisplayMode = false;
-       HRESULT                                         result;
+       HRESULT                                         result = 1;
 
        /*pthread_mutex_init(&sleepMutex, NULL);
        pthread_cond_init(&sleepCond, NULL);*/
index d97a515caf2aac2a4e59be66abc45d66b3292a11..491c63dc7acb08fd74871cd33aca19632e2a001c 100644 (file)
@@ -14,9 +14,9 @@ class DeckLinkCaptureDelegate : public IDeckLinkInputCallback
 {
 public:
        DeckLinkCaptureDelegate();
-       ~DeckLinkCaptureDelegate();
+       virtual ~DeckLinkCaptureDelegate();
 
-       virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) { return E_NOINTERFACE; }
+       virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID /*iid*/, LPVOID */*ppv*/) { return E_NOINTERFACE; }
        virtual ULONG STDMETHODCALLTYPE AddRef(void);
        virtual ULONG STDMETHODCALLTYPE  Release(void);
        virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged(BMDVideoInputFormatChangedEvents, IDeckLinkDisplayMode*, BMDDetectedVideoInputFormatFlags);
index e3f83287aad2211c36d64b2811c2fe3f95d07554..825ac621fb082bda029564f413aa0f90e55c5288 100644 (file)
@@ -90,13 +90,13 @@ void BMInterface::getBlackMagicDeviceList(KComboBox *devicelist, KComboBox *mode
                            result = displayMode->GetName((const char **) &displayModeString);
                            if (result == S_OK)
                            {
-                               char                                    modeName[64];
+                               //char                                  modeName[64];
                                int                                             modeWidth;
                                int                                             modeHeight;
                                BMDTimeValue                    frameRateDuration;
                                BMDTimeScale                    frameRateScale;
-                               int                                             pixelFormatIndex = 0; // index into the gKnownPixelFormats / gKnownFormatNames arrays
-                               BMDDisplayModeSupport   displayModeSupport;
+                               //int                                           pixelFormatIndex = 0; // index into the gKnownPixelFormats / gKnownFormatNames arrays
+                               //BMDDisplayModeSupport displayModeSupport;
 
 
                                // Obtain the display mode's properties
index 2b13697d2b08547c5ec718669a2bf779e6f539b6..0fa594cbb1f7a1f1e1b5b14aeb201bdb6848c3a4 100644 (file)
@@ -89,6 +89,7 @@ typedef void *LPVOID;
 class IUnknown
 {
     public:
+        virtual ~IUnknown() {};
        virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) = 0;
        virtual ULONG STDMETHODCALLTYPE AddRef(void) = 0;
        virtual ULONG STDMETHODCALLTYPE Release(void) = 0;
index e25ae5d00af70d92a9fcf423770a0a941f09cb20..0b63a1986209cdcb5ba92446bf5a6923656ec946 100644 (file)
@@ -124,6 +124,8 @@ void OnMonitorRectItem::slotMouseMoved(QGraphicsSceneMouseEvent* event)
         QRectF r = rect().normalized();
         QPointF p = pos();
         QPointF mousePosInRect = mapFromScene(mousePos);
+        QPointF diff = mousePos - m_clickPoint;
+        m_clickPoint = mousePos;
         switch (m_mode) {
         case ResizeTopLeft:
             if (mousePos.x() < p.x() + r.height() && mousePos.y() < p.y() + r.height()) {
@@ -186,11 +188,11 @@ void OnMonitorRectItem::slotMouseMoved(QGraphicsSceneMouseEvent* event)
             }
             break;
         case Move:
-            QPointF diff = mousePos - m_clickPoint;
-            m_clickPoint = mousePos;
             moveBy(diff.x(), diff.y());
             m_modified = true;
             break;
+        default:
+            break;
         }
     } else {
         switch (getMode(event->scenePos().toPoint())) {
@@ -228,6 +230,8 @@ void OnMonitorRectItem::slotMouseMoved(QGraphicsSceneMouseEvent* event)
 
 void OnMonitorRectItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
 {
+    Q_UNUSED(widget);
+
     painter->setPen(pen());
     painter->drawRect(option->rect);
 
index e422639ada7d709941ad863cec90dac706d7cb2b..e5cf8cb59b12396a46b78d5075b1ee0e146173e9 100644 (file)
@@ -1844,7 +1844,7 @@ void ProjectList::slotAddOrUpdateSequence(const QString frameName)
        if (!existing.isEmpty()) {
            // Sequence already exists, update
            QString id = existing.at(0)->getId();
-           ProjectItem *item = getItemById(id);
+           //ProjectItem *item = getItemById(id);
             QMap <QString, QString> oldprops;
             QMap <QString, QString> newprops;
            int ttl = existing.at(0)->getProperty("ttl").toInt();
index 698fb564f1368592bc27e8b08965d8ee41b7f3cf..c8201860cc901b71fc1be40f55c84466fd7ba674 100644 (file)
@@ -37,7 +37,8 @@
 #include <QAction>
 #include <QWheelEvent>
 
-MyLabel::MyLabel(QWidget *parent)
+MyLabel::MyLabel(QWidget *parent) :
+        QLabel(parent)
 {
 }
 
@@ -56,6 +57,8 @@ void MyLabel::wheelEvent(QWheelEvent * event)
 //virtual
 void MyLabel::paintEvent( QPaintEvent * event)
 {
+    Q_UNUSED(event);
+
     QRect r(0, 0, width(), height());
     QPainter p(this);
     p.fillRect(r, QColor(KdenliveSettings::window_background()));