From: Till Theato Date: Sun, 10 Oct 2010 09:05:59 +0000 (+0000) Subject: Fix some compilation warnings X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=28efc164e033e9e2b610b3708dc4bfe27ea21009;p=kdenlive Fix some compilation warnings svn path=/trunk/kdenlive/; revision=4976 --- diff --git a/src/blackmagic/capture.cpp b/src/blackmagic/capture.cpp index 6b93efe0..e6e618c5 100644 --- a/src/blackmagic/capture.cpp +++ b/src/blackmagic/capture.cpp @@ -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);*/ diff --git a/src/blackmagic/capture.h b/src/blackmagic/capture.h index d97a515c..491c63dc 100644 --- a/src/blackmagic/capture.h +++ b/src/blackmagic/capture.h @@ -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); diff --git a/src/blackmagic/devices.cpp b/src/blackmagic/devices.cpp index e3f83287..825ac621 100644 --- a/src/blackmagic/devices.cpp +++ b/src/blackmagic/devices.cpp @@ -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 diff --git a/src/blackmagic/include/LinuxCOM.h b/src/blackmagic/include/LinuxCOM.h index 2b13697d..0fa594cb 100644 --- a/src/blackmagic/include/LinuxCOM.h +++ b/src/blackmagic/include/LinuxCOM.h @@ -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; diff --git a/src/onmonitoritems/onmonitorrectitem.cpp b/src/onmonitoritems/onmonitorrectitem.cpp index e25ae5d0..0b63a198 100644 --- a/src/onmonitoritems/onmonitorrectitem.cpp +++ b/src/onmonitoritems/onmonitorrectitem.cpp @@ -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); diff --git a/src/projectlist.cpp b/src/projectlist.cpp index e422639a..e5cf8cb5 100644 --- a/src/projectlist.cpp +++ b/src/projectlist.cpp @@ -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 oldprops; QMap newprops; int ttl = existing.at(0)->getProperty("ttl").toInt(); diff --git a/src/stopmotion/stopmotion.cpp b/src/stopmotion/stopmotion.cpp index 698fb564..c8201860 100644 --- a/src/stopmotion/stopmotion.cpp +++ b/src/stopmotion/stopmotion.cpp @@ -37,7 +37,8 @@ #include #include -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()));