[vlc-commits] qt: mlnetworkdevicemodel: fix warnings

Alexandre Janniaux git at videolan.org
Thu Dec 5 17:18:01 CET 2019


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Sun Nov 17 19:16:34 2019 +0100| [2addfe9cb4d59d76dc331a41cbd68e4ee41f0fc0] | committer: Thomas Guillem

qt: mlnetworkdevicemodel: fix warnings

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2addfe9cb4d59d76dc331a41cbd68e4ee41f0fc0
---

 modules/gui/qt/components/mediacenter/mlnetworkdevicemodel.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/components/mediacenter/mlnetworkdevicemodel.cpp b/modules/gui/qt/components/mediacenter/mlnetworkdevicemodel.cpp
index 8979a19836..316dcd6f1f 100644
--- a/modules/gui/qt/components/mediacenter/mlnetworkdevicemodel.cpp
+++ b/modules/gui/qt/components/mediacenter/mlnetworkdevicemodel.cpp
@@ -116,7 +116,7 @@ bool MLNetworkDeviceModel::addToPlaylist(int index)
 {
     if (!(m_ctx && m_sdSource != CAT_MYCOMPUTER))
         return false;
-    if (index < 0 || index >= m_items.size() )
+    if (index < 0 || (size_t)index >= m_items.size() )
         return false;
     auto item =  m_items[index];
     vlc::playlist::Media media{ item.inputItem.get() };
@@ -141,7 +141,7 @@ bool MLNetworkDeviceModel::addAndPlay(int index)
 {
     if (!(m_ctx && m_sdSource != CAT_MYCOMPUTER))
         return false;
-    if (index < 0 || index >= m_items.size() )
+    if (index < 0 || (size_t)index >= m_items.size() )
         return false;
     auto item =  m_items[index];
     vlc::playlist::Media media{ item.inputItem.get() };
@@ -211,7 +211,7 @@ void MLNetworkDeviceModel::onItemCleared( MediaSourcePtr mediaSource, input_item
     refreshDeviceList( std::move( mediaSource), node->pp_children, node->i_children, true );
 }
 
-void MLNetworkDeviceModel::onItemAdded( MediaSourcePtr mediaSource, input_item_node_t* parent,
+void MLNetworkDeviceModel::onItemAdded( MediaSourcePtr mediaSource, input_item_node_t*,
                                   input_item_node_t *const children[],
                                   size_t count )
 {



More information about the vlc-commits mailing list